Use a metamodel with an EMap reference (a multivalued reference with type pointing to an EStringToStringMapEntry Eclass, with java.util.Map$Entry instance type name).
When you instantiate a map entry with the null key, it makes org.eclipse.emfcloud.jackson.databind.ser.EMapStringSerializer.serialize(EList<Entry<String, ?>>, JsonGenerator, SerializerProvider) crash with NPE.
Since Map keys in json are only strings, null can not be used. It would be acceptable to have a default key configured instead of null (probably empty string).
Ideally we could configure this default key value with jackson. (see https://www.baeldung.com/jackson-map-null-values-or-null-key )
See https://github.com/eclipse-emfcloud/emfcloud/discussions/155 for broader context
Use a metamodel with an EMap reference (a multivalued reference with type pointing to an EStringToStringMapEntry Eclass, with
java.util.Map$Entry
instance type name). When you instantiate a map entry with thenull
key, it makesorg.eclipse.emfcloud.jackson.databind.ser.EMapStringSerializer.serialize(EList<Entry<String, ?>>, JsonGenerator, SerializerProvider)
crash with NPE.Since Map keys in json are only strings,
null
can not be used. It would be acceptable to have a default key configured instead ofnull
(probably empty string). Ideally we could configure this default key value with jackson. (see https://www.baeldung.com/jackson-map-null-values-or-null-key )Note I am willing to contribute on this.