Jackson features an annotation named @JsonRawValue:
@JsonRawValue: per-property marker that can be used to specify that the value of property is to be included in serialization ''exactly'' as is, with no escaping or decoration -- useful for embedding pre-serialized JSON (or whatever data format is being used) in output
It would be handy to also have this in emfjson, both for serialization as well as deserialization, where the latter is currently not supported by Jackson's annotation.
An example Xcore:
class Foo {
@JsonRawValue(value="true")
String raw
}
The following JSON object and EObject should be equivalent:
Jackson features an annotation named
@JsonRawValue
:It would be handy to also have this in emfjson, both for serialization as well as deserialization, where the latter is currently not supported by Jackson's annotation.
An example Xcore:
The following JSON object and
EObject
should be equivalent: