I need to create a JSON attribute with a key that only has an empty object as its value as you can see at key1.
{
"key1": {},
"key2": {
...
}
"key3": [
...
]
}
Problem is that the JSONTemplater turns empty objects into null. An empty object is valid JSON and is very different from the value null so this behavior is completely incorrect.
How can I set an empty object as a value inside a JSON attribute?
I tried using the JSONUpdater but it works in the same way. If you set value type to JSON/XQuery it replaces the object with null. If you set the type to plain text, it only creates a string “{}” containing two curly braces.