Bug 7987: Json HTTP PATCH: Problem parsing simple leaf value
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / rest / impl / JsonToPATCHBodyReader.java
index 9968a25fc06adcdf0feae4a1b7dacc3b3eb0d771..5b169885bcd1819026bd9aab7eef028b4f3acac9 100644 (file)
@@ -300,6 +300,12 @@ public class JsonToPATCHBodyReader extends AbstractIdentifierAwareJaxRsProvider
      * @throws IOException
      */
     private void readValueObject(@Nonnull final StringBuffer value, @Nonnull final JsonReader in) throws IOException {
+        // read simple leaf value
+        if (in.peek() == JsonToken.STRING) {
+            value.append("\"" + in.nextString() + "\"");
+            return;
+        }
+
         in.beginObject();
         value.append("{");