Skip to content

Couchbase.Extensions.Session - can data be stored as raw JSON? #60

Description

@mgroves

When using the SetObject extension, data is stored in Couchbase like so:

{
	"sessionkey": "eyJVc2VyTmFtZSI6IkZlbGlwZV9Qb3dsb3dza2kyNyIsIlNNUyI6IjEtODY5LTM5Ny00MjM4In0=",
	"sessionkey2": "eyJSZWdpb24iOiJBWiIsIkVtcGxveWVyIjoiT2JlcmJydW5uZXIgLSBTY2h1bW0ifQ=="
}

Which appears to be an encoded byte array.

But it seems like this is a change in behavior since 1.0.0-beta2, which would store as literal JSON (see blog post https://blog.couchbase.com/distributed-session-aspnet-couchbase/):

{
	"sessionkey": {
		"name": "Matt",
		"twitter": "@mgroves",
		"guid": "2017-09-19T10:47:43.2705915-04:00"
	},
	"sessionkey2": {
		"address": "123 Main St",
		"city": "Lancaster",
		"state": "OH"
	}
}

It's not the end of the world if it must be the former, but it does limit analysis on sessions that can be done with N1QL/SQL++/Analytics/FTS. Is it possible there was a change (in the extension or in ASP.NET Core) that caused this? Is it possible to switch it back to storing JSON (or at least to give the option of storing in JSON)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions