Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON parsing error for a specific input. #236

Closed
navaneethyv opened this issue Jun 2, 2021 · 2 comments
Closed

JSON parsing error for a specific input. #236

navaneethyv opened this issue Jun 2, 2021 · 2 comments

Comments

@navaneethyv
Copy link

The JSON parsing fails for the following data.

:~/clixon/util $ cat data.json | ./clixon_util_json -D 1 -p

Jun  2 11:32:02: _json_parse 0 {
  "data": {
    "test-config:system": {
      "load-last-config": "true",
      "time-zone": "GMT",
      "host": {
        "element-name": "muc_spine1",
        "pod-name": "muc",
        "role": "SPINE"
      }
    },
    "test-config:lldp": {
      "system-name": "spine1",
      "admin-status": "disable",
      "tx-interval": 30,
      "tx-hold": 120,
      "interface": []
    },
    "test-config:interface": [
      {
        "name": "lo-0/0/0",
        "description": "Primary loopback",
        "unit": [
          {
            "unit-id": 1,
            "instance": "default",
            "address": {
              "ipv4": [
                {
                  "prefix4": "10.99.0.1/32"
                }
              ],
              "ipv6": [
                {
                  "prefix6": "fd3d:3d:0:99::1/128"
                }
              ]
            }
          }
        ]
      },
      {
        "name": "memif-0/1/1",
        "description": "to spine2",
        "memif-id": 5011,
        "master": "true",
        "unit": [
          {
            "unit-id": 1,
            "instance": "default",
            "address": {
              "ipv4": [
                {
                  "prefix4": "10.0.100.1/30"
                }
              ],
              "ipv6": [
                {
                  "prefix6": "fd3d:3d:100:a::1/64"
                }
              ]
            }
          }
        ]
      },
      {
        "name": "memif-0/1/2",
        "description": "to spine2",
        "memif-id": 5012,
        "master": "true",
        "unit": [
          {
            "unit-id": 1,
            "instance": "default",
            "address": {
              "ipv4": [
                {
                  "prefix4": "10.0.100.5/30"
                }
              ]
            }
          }
        ]
      }
    ]
  }
}


Jun  2 11:32:02: clixon_json_parseparse: 1515: XML error: YYERROR stack? ',' 65
Jun  2 11:32:02: JSON error: line 65
Jun  2 11:32:02: _json_parse retval:-1
@navaneethyv navaneethyv changed the title JSON parsing error for a given input. JSON parsing error for a specific input. Jun 2, 2021
@olofhagsand olofhagsand added the bug label Jun 2, 2021
olofhagsand added a commit that referenced this issue Jun 9, 2021
  * JSON empty list parse problems, eg `a:[]`
@olofhagsand
Copy link
Member

Fixed by patch. Please verify.
Thanks for reporting.

@navaneethyv
Copy link
Author

Verified. Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants