3

I have a large JSON file returned from a web service. I am using json_last_error() to get the error code, but would like to know which string is giving the error so that I can design a regex for it. How would I return the string giving the error?

2

1 Answer 1

0

I know I'm late, but I was researching about this and my solution was this library: https://github.com/Seldaek/jsonlint

With this library you can check the syntax of a JSON string and it gives you more detail than json_last_error() method do.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.