Sub-Document operations with empty key in path

I use Sub-Document operations to patch documents in my couchbase 5.0.1.

Let’s consider that we want to update an existing document with following json:

	"prop1": {
		"": { 
			"prop2": "some value"

Please notice that there is a empty string as a key.

If I update document using path “prop1”:

asyncBucket.mutateIn(id).upsertDocument(true) //
				.upsert("prop1", mapWithEmptyKey)

then it finishes successfully so the key with empty string is stored properly to database.

But if I try to use empty key in path then I receive error SUBDOC_PATH_INVALID. Examples of paths:


It is a bit inconsistent.

Is it possible to use Sub-Document api with “empty” keys? Is it a special notation for that case (other than putting value in double-backticks (``))?

Empty key is not valid JSON.

According to standard ECMA-404 (, the empty string is a valid json value.