Skip to content
This repository was archived by the owner on Jun 26, 2021. It is now read-only.
This repository was archived by the owner on Jun 26, 2021. It is now read-only.

Provide access to the associated ObjectMapper in JsonResource via default load/save options #96

@kchobantonov

Description

@kchobantonov

When combined with EMF mongo project we do need an access to the object mapper associated with the JsonResource so that we can use the predefined ObjectMapper in MongoInputStream/MongoOutputStream instead of creating new ObjectMapper via EMFModule.setupDefaultMapper();

Possible implementation

 ```
  public JsonResource(URI uri, ObjectMapper mapper) {
	super(uri);
	this.mapper = mapper;
	
    defaultLoadOptions = new HashMap<Object, Object>();
    defaultSaveOptions = new HashMap<Object, Object>();
    
    defaultLoadOptions.put(ObjectMapper.class.getName(), mapper);
    defaultSaveOptions.put(ObjectMapper.class.getName(), mapper);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions