Skip to content

Missing a JSON-B to JSON processing bridge, or missing support for JSON PATCH #67

@jansupol

Description

@jansupol

I've posted the complete use case to SO:
https://stackoverflow.com/questions/48194222/missing-bridge-between-json-b-and-json-apis

In short:
In order to implement HTTP PATCH restful method, I'm using JSON processing to apply a JSON PATCH to a DTO annotated with JSON-B. The problem is quite simple: JSON-B converts an object from / to a JSON representation which is serialized / deserialized in a String, resulting in the following strategy to apply a patch:

  1. Use JSON-B to convert the DTO into a JSON representation (String)
  2. Use JSON processing to convert the JSON representation into a JsonObject
  3. Apply the JSON patch
  4. Use JSON processing to convert the result into a JSON representation (String)
  5. Use JSON-B to convert the JSON representation into the original DTO form.

A bridge between both libraries would be great, or if such dependencies are not desired, implementing JSON patch + bean validation to JSON-B would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions