Page 1 of 1

Parsing JSON file using Hierarchical Stage

Posted: Mon Sep 12, 2016 9:02 am
by tan1111
Dear All,

I am pasting the body here of a JSON, which I was unable to parse in DS 11x, using Hierarchical Stage.

Code: Select all

{"PersonContactMethodBObj": [
              {
                "ContactMethodUsageValue": "BUSINESS-FAX",
                "TCRMContactPersonBObj": [
                  {
                    "Name": "Jack",
                    "Age": "21"
                  },
                  {
                    "Name": "Julie",
                    "Age": "FAX_new"
                  }
                ]
              },
              {
                "ContactMethodUsageValue": "BUSINESS-PHONE",
                "TCRMContactPersonBObj": {
                  "Name": "Ishara",
                  "Age": "18"
                }
              },
            ]
}

Please let me know, if anyone could parse it.
Would be of great help.

Thanks in advance,

Posted: Mon Sep 12, 2016 9:37 am
by chulett
You were 'unable to parse' this in what sense - you are getting errors? Not sure how to approach it? Not getting proper output?

Detail for us what you've tried and the issues you are seeing.

Posted: Mon Sep 12, 2016 11:33 am
by qt_ky
Yes, you need to share actual error messages...

In this case the error is plainly visible. You can also google "JSON validator" and try a site like this one: http://jsonlint.com/

Paste it in and validate. It will highlight the error.

Near the end you have }, ] } and you can see that there's no value after that last comma. It's invalid JSON.