Questions tagged [jsonlint]

JSONLint is a JSON linting (validation) and formatting tool.

JSONLint, which validates and formats files, is available as a browser based tool as well as a pure JavaScript version.

The latter can be integrated with or another server-side solution for command line usage.

It can also be integrated with any which supports JavaScript for development.

54 questions
1
vote
0 answers

JSON + Jinja validator tool

I have a JSON templates with Jinja template code. JSON Lint can validate JSON but borks on Jinja characters. Is there a tool (editor add-on, online, or CLI) that validates JSON and Jinja? Or can one suggest how to do this with JSONLint and…
Sflagg
  • 219
  • 1
  • 9
1
vote
1 answer

jQuery.getJSON callback does not fire in IE7

A valid JSON*, returned with correct HTTP headers: Content-Type:application/json; charset= Works in Chrome/FF, and IE7 is refusing to parse it. Where do I look for clues? $.getJSON(url, null, function(data){ alert(data); /* never fires in IE7 */…
Andrew Kolesnikov
  • 1,920
  • 1
  • 14
  • 20
1
vote
1 answer

JSON invalid according to jQuery but not JSONlint

I have a .NET web service returning the following JSON: {"command":"getqcardjson","valuesets":[{"datatable":"eaa65990-8f88-45e0-966b-610858ad4cb6","values":[{"Id":"eaa65990-8f88-45e0-966b-610858ad4cb6","InternalName":"Alpha…
DEH
  • 1,647
  • 3
  • 25
  • 45
1
vote
2 answers

Prevent CodeMirror json-lint from linting empty input

I'm putting together a quick CodeMirror input for JSON and to make sure the user doesn't mess things up, I'm using the json-lint addon. My issue is that immediately on render the empty CodeMirror input is displaying a lint error. I understand that…
Kevin Nagurski
  • 1,889
  • 11
  • 24
1
vote
2 answers

jsonlint schema not validating

I am trying to learn a bit about json. I installed jsonlint using npm. I copied a schema and a file from this website exactly. They are as follows: test.json: [ { "id": 2, "name": "An ice sculpture", "price": 12.50, …
user5505266
  • 593
  • 5
  • 20
1
vote
2 answers

json error: parsererror

I am developing a balloon notification for my social network. I came across this error when there's 2 or more notifications. I checked my JSON response on jsonlint.com, and I got error at line 6. JSON response: { "nid": "1101", "img":…
clonex1
  • 151
  • 1
  • 10
1
vote
1 answer

JSON Lint throwing parsing error

JSON Lint throwing parsing error for following string. I am saying it as string because, i got this data in string format and then I generate this code. Isn't it a valid JSON? Please help [ ​{ "x": "57", "y": "30", …
disp_name
  • 1,448
  • 2
  • 20
  • 46
1
vote
1 answer

JSONLINT: Parse error on string

I'm trying to verify the following JSON on www.jsonlint.com: http://s2g.supsi.ch/hcd/test.json If I copy and paste the text in jsonlint the JSON is verified. However if I enter the JSON URL (http://s2g.supsi.ch/hcd/test.json) to jsonlint I receive…
Davide Rivola
  • 253
  • 2
  • 12
1
vote
1 answer

Why is the JSON that flot expects no longer valid in JSONLint (and hence jQuery 1.4.x)?

Attempting to use the data series from this example no longer passes the JSONLint test. and as such attempting to use it with jQuery 1.4 fails. Specifically, returning it or data like it from an AJAX request as type json will cause jQuery to throw…
Jedidja
  • 16,610
  • 17
  • 73
  • 112
0
votes
1 answer

Parsing JSON with jQuery's ajax method

I'm currently fiddling around with JSON - but I can't get jQuery's $.ajax method to parse my feed. I've validated the feed with JSONLint, and the JS with JSLint - it appears to be fine. Check out my jsfiddle-example here:…
timkl
  • 3,299
  • 12
  • 57
  • 71
0
votes
2 answers

Trying to parse a JSON string, but always fails

This piece of JSON right here: {"user":[{"idUser":"1","username":"USERNAME","userFullName":"FULL NAME","userEmail":"EMAIL@MAIL.COM"}]} Does not validate in jsonlint also not with GWT. What is strange is that if I delete the first curly brace and…
elvispt
  • 4,832
  • 7
  • 27
  • 35
0
votes
1 answer

how to save into a json file in python - Expecting 'STRING', '}', got 'undefined'

I have been trying to write into a json file like this: with open(file_out, 'w') as f: json.dump(dicts, f, indent=4) dicts here is a list of dictionaries created in python, which looks like this: [{'date': '2018-12-11', 'base':…
Bluetail
  • 1,093
  • 2
  • 13
  • 27
0
votes
1 answer

Parsing errors when writing to a json file from python

I have seen similar questions yet not sure what do I need to change in my case to make it a valid json. I have a list of dictionaries like this: dicts = [{'date': '2018-12-11', 'target_currency': 'DKK', 'exchange_rate': 7.4641, …
Bluetail
  • 1,093
  • 2
  • 13
  • 27
0
votes
1 answer

How to validate selected text as JSON in VS Code?

Is there an extension or other solution that allows you to validate selected text as JSON in VS Code? It's something very simple in concept that I've been doing for years in Notepad++, but surprisingly I still haven't found a way to do this in VS…
thdoan
  • 18,421
  • 1
  • 62
  • 57