opendaylight

Opendaylight convert from builder to JSON


I have defined a YANG model for which I constructed an object using the builder of this model in my java code. Now I want to serialize this as a JSON string. I am not sure how to proceed. Using builder.build() gives me a string but the generated string is not the expected json.

Thanks for any help/pointers. Regards, Ranga


Solution

  • The following, was suggested by Richard Kosegi of the JSON-RPC development team:

    https://lists.opendaylight.org/pipermail/jsonrpc-dev/2019-July/000322.html

    I made a few modifications and got it working. Just posting here to share knowledge.

    Ranga