JSON Validation Expecting 'EOF'

json validator
json formatter
json validator java
jsonlint
what does eof mean in json
json beautifier
expecting 'string', got '}'
expecting 'eof'

I am working on a restful api and have been validating with http://jsonlint.com/. After combining two JSON objects I ran into;

Parse error on line 932:
...ssions": 329    }],[    {        "m
---------------------^
Expecting 'EOF'

I looked around and found this question but all of the answers point to not having a comma, where in my problem I do have a comma. What else could the validator be looking for?

it is pointing at the code between my object arrays;

],
[

You haven't shown enough of your JSON, but I'm guessing it looks like this:

[
    {"some": "object"},
    {"some": "object"}
],
[
    {"some": "object"},
    {"some": "object"}
]

...which is invalid. In JSON, there must be one top-level item (which in a complete JSON document must either an object or an array).

If you're combining two responses, you might make each of them the value of a property on a wrapper object, e.g.:

{
    "response1": [
        {"some": "object"},
        {"some": "object"}
    ],
    "response2": [
        {"some": "object"},
        {"some": "object"}
    ]
}

What is wrong with this json string?Expecting 'EOF', '}', ',', ']', got , Missing commas - commas are required between all fields, of any type. Please use existing validator tools: jsonlint makes this error 'extra clear',� This is possibly due to the way Windows handles newlines. Essentially, if you have just newline characters ( ) in your JSON and paste it into JSONLint from a Windows computer, it may validate it as valid erroneously since Windows may need a carriage return (\r) as well to detect newlines properly.

I am no expert on multi root JSON structures But here is what I did.. Just changed the encoding of the stream to UTF-8 and my PHP code started working very well

JSONLint, JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format. JSON Validator ( JSON Lint ) is easy to use JSON Validate tool. Copy, Paste and Validate. What can you do with JSON Validator? It helps to Validate your JSON data. It also works as JSON Checker as JSON syntax checker. This tools allows to load JSON data based on URL. User can also validate JSON File by uploading file.

In my case, it was a semi-colon at the end of JSON object that was throwing this error on jsonlint:

Expecting 'EOF', '}', ',', ']', got 'undefined'

Removing that solved it.

expecting eof json Code Example, Get code examples like "expecting eof json" instantly right from your google binaryserachindex javascript � bind and unbind jquery validation� Define Schema: Describe what kind of JSON you expect Convert JSON to Python Object using json.load or json.loads methods. Pass resultant JSON to validate () method of a jsonschema. This method will raise an exception if given json is not what is described in the schema.

remove doubles quotes from brackets [

flask-expects-json � PyPI, Validate JSON request data. When building json REST services I find myself already specifying json-schema for POST data while defining swagger spec. This � then the validator will always be expecting an array as the value for odds, hence a response where odds is a String will fail validation. So, if we would like to be less strict with our responses, we can add a custom rule during validation by first making the following static import: io.restassured.module.jsv.JsonSchemaValidatorSettings.settings;

Python Validate JSON Data, Validate JSON Schema using Python. Validates incoming error expecting property name enclosed in double quotes: line 1 column 2 (char 1). I looked at a flow run for the failed case and the service is not returing a JSON object - Can you check? In the headers the content-type is text/html. Also - the body object is not a well formed JSON object - I see the same errors parsing hte object with JSON editors " Expecting 'STring', got 'undefined.

Test-Json, The Test-Json cmdlet tests whether a string is a valid JavaScript Object In this example, we get an error because the schema expects an integer for age but the � It's also worth noting that the JSON is still invalid even after converting to normal quote characters. There is a trailing comma after “price” : 22.51 } ],. There is no item that follows it, so the comma should be removed. – gfullam Dec 31 '15 at 20:20

$validator->check expects an json in form of an object but throws no , I was trying to figure out why the validator didn't work properly because I was getting the error in $validator->getErrors() instead of� JSON or JavaScript Object Notation is a language-independent open data format that uses human-readable text to express data objects consisting of attribute-value pairs. Although originally derived from the JavaScript scripting language, JSON data can be generated and parsed with a wide variety of programming languages including JavaScript, PHP

Comments
  • Please show a complete representative example of the JSON in question. I've taken an educated guess at what the problem is, but a complete, minimal example is always the better way to go.
  • Your guess was correct, the first block is the way I put my JSON together. I will try to figure out your solution. Thanks.
  • Welcome to StackOverflow. Could you provide more context to your answer and clarify for example which double quotes you mean? In the given example no double quotes are surrounding the brackets.