Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How does JSON request input get valdiated in OpenDaylight

asked 2016-09-25 17:48:44 -0700


I am trying to understand that we invoke an RPC through restconf by providing request in json format, how this json request gets validated against yang model.

Any information will be much appreciated...!!

Thanks Kanika

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-10-21 07:25:12 -0700

Hello Kanika,

YangTools project is provide XML and JSON codec to translate payload to NormalizedNode, which is the Java representation of the YANG model. At the time of the de-serialization, when the request hit the server, the payload is translated using those codec. See here for the JSON and XML (un)marshaller.

Hope this helps, Alexis

edit flag offensive delete publish link more

answered 2016-09-26 17:07:21 -0700

mahanare gravatar image

may be you need to provide more details. what exactly you need?

when we define yang model and RPCs within it and provide its implementation and once the karaf is started, you should be able to use the RPCs. you may want to refer to (sal-rest-connector) or debug this module (download restconf code and debug the flow as you test your code).

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-25 17:48:44 -0700

Seen: 37 times

Last updated: Oct 21 '16