use of org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream in project opennms-opendaylight-plugin by OpenNMS.
the class OpendaylightRestconfClient method streamJsonToNode.
private NormalizedNode<?, ?> streamJsonToNode(String json, DataSchemaNode parentNode) {
final NormalizedNodeResult result = new NormalizedNodeResult();
final NormalizedNodeStreamWriter streamWriter = ImmutableNormalizedNodeStreamWriter.from(result);
final JsonParserStream jsonParser = JsonParserStream.create(streamWriter, s_schemaContext, parentNode);
jsonParser.parse(new JsonReader(new StringReader(json)));
return result.getResult();
}
Aggregations