Issue-ID: CPS-89
Signed-off-by: Rishi.Chail <rishi.chail@est.tech>
Change-Id: I72e734929b464072e23b08a1e213b5fac31ff710
public void saveData(final String dataspaceName, final String anchorName, final String jsonData) {
final Anchor anchor = cpsAdminService.getAnchor(dataspaceName, anchorName);
final SchemaContext schemaContext = getSchemaContext(dataspaceName, anchor.getSchemaSetName());
public void saveData(final String dataspaceName, final String anchorName, final String jsonData) {
final Anchor anchor = cpsAdminService.getAnchor(dataspaceName, anchorName);
final SchemaContext schemaContext = getSchemaContext(dataspaceName, anchor.getSchemaSetName());
- final NormalizedNode normalizedNode = YangUtils.parseJsonData(jsonData, schemaContext);
+ final NormalizedNode<?, ?> normalizedNode = YangUtils.parseJsonData(jsonData, schemaContext);
final DataNode dataNode = new DataNodeBuilder().withNormalizedNodeTree(normalizedNode).build();
cpsDataPersistenceService.storeDataNode(dataspaceName, anchor.getName(), dataNode);
}
final DataNode dataNode = new DataNodeBuilder().withNormalizedNodeTree(normalizedNode).build();
cpsDataPersistenceService.storeDataNode(dataspaceName, anchor.getName(), dataNode);
}
* @param schemaContext the SchemaContext for the given data
* @return the NormalizedNode representing the json data
*/
* @param schemaContext the SchemaContext for the given data
* @return the NormalizedNode representing the json data
*/
- public static NormalizedNode parseJsonData(final String jsonData, final SchemaContext schemaContext) {
+ public static NormalizedNode<?, ?> parseJsonData(final String jsonData, final SchemaContext schemaContext) {
final JSONCodecFactory jsonCodecFactory = JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02
.getShared(schemaContext);
final NormalizedNodeResult normalizedNodeResult = new NormalizedNodeResult();
final JSONCodecFactory jsonCodecFactory = JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02
.getShared(schemaContext);
final NormalizedNodeResult normalizedNodeResult = new NormalizedNodeResult();