[CONTROLLER-1066] Malformed JSON - multiline string Created: 12/Dec/14 Updated: 14/Nov/17 Resolved: 16/Jun/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jozef Gloncak | Assignee: | Jan Hajnar |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2507 |
| Description |
|
If leaf or leaf-list is of type string which contains new lines then it is outputed to JSON as multiline string, which isn't supported. It is malformed JSON. Therefore new line characters should be escaped. |
| Comments |
| Comment by Jozef Gloncak [ 12/Dec/14 ] |
|
Patch was submitted to master should go to stable-helium and shouldn't be solved via new line replacing |
| Comment by Jozef Gloncak [ 16/Dec/14 ] |
|
patch submitted to stable/helium currently for replacing isn't called replace method but specific characters (\, \n, \r, ") are escaped with additional \. |
| Comment by Andrej Marcinek [ 20/Mar/15 ] |
|
tested on helium SR3 with installed features: odl-mdsal-broker odl-tcpmd5-all odl-restconf odl-bgpcep-all odl-openflowjava-protocol odl-openflowplugin-flow-services-rest odl-openflowplugin-drop-test odl-l2switch-switch-rest odl-netconf-connector-ssh otification-broker","name":"binding-notification-broker"},{"type":"openflow-provider-impl:msg-spy-service-impl","name":"msg-spy-service-impl","openflow-provider-impl:openflow-plugin-provider": {"name":"openflow-provider","type":"openflow-provider:openflow-provider"},"openflow-provider-impl:msgStatistics":"Fri 2015.03.20 at 02:20:09 PM UTC\ ,"odl-bgp-rib-impl-cfg:boss-group": {"name":"global-boss-group","type":"netty:netty-threadgroup"},"odl-bgp-rib-impl-cfg:worker-group":{"name":"global-worker-group","type":"netty:netty-threadgroup"}},{"type":"odl-sal-netconf-connector-cfg:sal-netconf-connector","name":"controller-config_xrvr","odl-sal-netconf-connector-cfg:address":"10.25.2.37","odl-sal-netconf-connector-cfg:dom-registry":{"name":"dom-br |
| Comment by Jan Hajnar [ 26/Mar/15 ] |