Here is your JSON file pasted straight into Netbeans, with some garbage added 
to show you error checking:

[cid:image002.png@01D4F461.A930F4F0]

From: Thomson, Duncan
Sent: Tuesday, April 16, 2019 2:32 PM
To: Greenberg, Gary <ggree...@visa.com>; wadechand...@apache.org
Cc: users@netbeans.apache.org
Subject: RE: [EXT] RE: Json validation

You need to be clear whether you are talking about checking whether some text 
is legal JSON syntax, versus checking whether that text conforms to a JSON 
schema.

The Netbeans editor will already do the former on text in a .json file, but I 
think you are asking for the latter.

It’s important to use the terminology correctly to avoid confusion.  I think 
the term “validation” usually applies to the validation of content against a 
schema, but I’m not sure, so somebody please correct me if I’m using the terms 
incorrectly.

Anyway, if you simply google on JSON schema validation, you will find lots of 
discussion of how to do it.  I think you are asking whether any of these tools 
are built in to Netbeans, the way some the XML schema validation tools were (I 
think).    I think the answer is “no”.  My guess is that there may not be 
sufficient interest in JSON schema to merit this.

Also worth noting, XML schema lets you say things like: X must be a string, 
containing only upper case characters or a dollar sign character, except on a 
Tuesday, when it can contain an underscore.  OK, I made up that part about 
Tuesday, but my point is that XML schema allows one to be extremely 
prescriptive.  Not sure the same is possible in JSON schema.  Again, I may be 
wrong, so if so please correct me.  (Validating input against JSON schema is on 
my To Do List for a project I’m working on.)

Duncan

From: Greenberg, Gary <ggree...@visa.com<mailto:ggree...@visa.com>>
Sent: Tuesday, April 16, 2019 1:24 PM
To: wadechand...@apache.org<mailto:wadechand...@apache.org>
Cc: users@netbeans.apache.org<mailto:users@netbeans.apache.org>
Subject: [EXT] RE: Json validation

I sure do have one. Here it is.

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com<mailto:ggree...@visa.com>
M: 650-269-7902

[EmailSig-TaglineVersion]

From: Wade Chandler <wadechand...@apache.org<mailto:wadechand...@apache.org>>
Sent: Monday, April 15, 2019 6:23 PM
To: Greenberg, Gary <ggree...@visa.com<mailto:ggree...@visa.com>>
Cc: users@netbeans.apache.org<mailto:users@netbeans.apache.org>
Subject: Re: Json validation

Pretty sure .json files themselves are validated like other file types; editor 
lot has it built in. Do you have a reproducible file you can share?

Wade


On Mon, Apr 15, 2019, 18:06 Greenberg, Gary 
<ggree...@visa.com<mailto:ggree...@visa.com>> wrote:
I know that Netbeans has a feature to validate XML files and I used it 
extensively when XML was main method to define requests and responses in REST 
API.
Nowadays JSON almost completely replaced XML in that role.
Is there a plugin or something to validate JSON or help to check it for errors?
I do have pretty big JSON file which somewhere contain an error, but cannot 
find it easily.
Netbeans marks the opening brace with an error flag, which tells me Token 
recognition at “
Going through it for ½ hour and can’t spot any errors.
Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com<mailto:ggree...@visa.com>
M: 650-269-7902

[EmailSig-TaglineVersion]

Reply via email to