<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: yang-patch with JSON data in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4168311#M5740</link>
    <description>&lt;P&gt;Was this ever fixed? Seeing the same problem on 5.3.2.4.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2020 14:12:03 GMT</pubDate>
    <dc:creator>tsiemers1</dc:creator>
    <dc:date>2020-10-16T14:12:03Z</dc:date>
    <item>
      <title>yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4113039#M5424</link>
      <description>&lt;P&gt;I've been trying to use the yang-patch method with JSON data to write changes to device configurations in NSO, but have been having trouble making it work. Below is the JSON data I am trying to send to&amp;nbsp;/restconf/data to configure an IOS device:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
  "ietf-yang-patch:yang-patch": {
    "patch-id": "test-patch",
    "edit": [
      {
        "edit-id": "test1",
        "operation": "merge",
        "target": "/tailf-ncs:devices/device=hs4-inf-p-rr01/config/tailf-ned-cisco-ios:interface/GigabitEthernet0%2F0%2F5.51",
        "value": {
          "tailf-ned-cisco-ios:GigabitEthernet": [
            {
              "name": "0/0/5.51",
              "description": "Test",
            }
          ]
        }
      }
    ]
  }
}&lt;/PRE&gt;
&lt;P&gt;This just returns a malformed-message error. When I attempt the same thing using XML with the following data, it works correctly:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;yang-patch xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-patch"&amp;gt;
  &amp;lt;patch-id&amp;gt;test-patch&amp;lt;/patch-id&amp;gt;
  &amp;lt;edit&amp;gt;
    &amp;lt;edit-id&amp;gt;test1&amp;lt;/edit-id&amp;gt;
    &amp;lt;operation&amp;gt;merge&amp;lt;/operation&amp;gt;
    &amp;lt;target&amp;gt;/tailf-ncs:devices/device=hs4-inf-p-rr01/config/tailf-ned-cisco-ios:interface/GigabitEthernet=0%2F0%2F5.51&amp;lt;/target&amp;gt;
    &amp;lt;value&amp;gt;
      &amp;lt;GigabitEthernet xmlns="urn:ios"  xmlns:ios="urn:ios"  xmlns:ncs="http://tail-f.com/ns/ncs"&amp;gt;
        &amp;lt;name&amp;gt;0/0/5.51&amp;lt;/name&amp;gt;
        &amp;lt;description&amp;gt;Test&amp;lt;/description&amp;gt;
      &amp;lt;/GigabitEthernet&amp;gt;
    &amp;lt;/value&amp;gt;
  &amp;lt;/edit&amp;gt;
&amp;lt;/yang-patch&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone advise what I am doing wrong with the JSON?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 15:54:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4113039#M5424</guid>
      <dc:creator>tcragg1</dc:creator>
      <dc:date>2020-07-03T15:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4115547#M5443</link>
      <description>&lt;P&gt;Could it be that:&lt;/P&gt;
&lt;PRE&gt;"description": "Test",   &amp;lt;--- remove final comma&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jul 2020 19:32:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4115547#M5443</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2020-07-08T19:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4115962#M5449</link>
      <description>&lt;P&gt;Unfortunately not, I still just get a malformed message error if I remove that comma and re-try.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 13:01:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4115962#M5449</guid>
      <dc:creator>tcragg1</dc:creator>
      <dc:date>2020-07-09T13:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4116334#M5457</link>
      <description>I could reproduce this with a toy example. It seems to be bug and I filed a ticket for it.</description>
      <pubDate>Fri, 10 Jul 2020 00:23:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4116334#M5457</guid>
      <dc:creator>perander</dc:creator>
      <dc:date>2020-07-10T00:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4168311#M5740</link>
      <description>&lt;P&gt;Was this ever fixed? Seeing the same problem on 5.3.2.4.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 14:12:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/4168311#M5740</guid>
      <dc:creator>tsiemers1</dc:creator>
      <dc:date>2020-10-16T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: yang-patch with JSON data</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/5329367#M8862</link>
      <description>&lt;P&gt;I realize this is 5 years later so probably not helpful, but I landed here searching for help with something else and noticed what might have been your problem.. In your JSON example, your target value is missing an `=` between the interface node name "GigabiteEthernet" and the key "0/0/5.51". In your XML example (which you said works) you did include the `=` sign.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 16:24:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/yang-patch-with-json-data/m-p/5329367#M8862</guid>
      <dc:creator>chopps</dc:creator>
      <dc:date>2025-09-11T16:24:20Z</dc:date>
    </item>
  </channel>
</rss>

