Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
-
1
Description
I've not been able to insert `null` content with Java SDK either at top-level or within an object.
collection.upsert("withnull", null); |
|
=>
|
com.couchbase.client.core.error.InvalidArgumentException: Content cannot be null |
collection.upsert("withnull", JsonObject.create().put("null", null)); |
|
=>
|
reference to put is ambiguous both method put(java.lang.String,java.lang.Number) in com.couchbase.client.java.json.JsonObject and method put(java.lang.String,java.util.List<?>) in com.couchbase.client.java.json.JsonObject match
|
nulls are allowed by both Couchbase Server and ECMA-404 in either position, so this isn't great.
Graham Pople mentioned https://issues.couchbase.com/browse/JCBC-1723 for the top-level issue.
I think I did manage to get a value-level null at some point, possibly using `Map`, but it seems counterintuitive that JsonObject doesn't handle it elegantly.
Attachments
Issue Links
- relates to
-
JCBC-1723 Cache (spring-data) allows null content. upsert does not allow null content.
- Resolved