Re: Json validation

2019-04-22 Thread Wade Chandler
On Mon, Apr 22, 2019, 17:24 Mark Eggers 
wrote:

> On 4/16/2019 10:23 AM, Greenberg, Gary wrote:
> > I sure do have one. Here it is.
> >
>
> It looks like a BOM for UTF-8.
>

For further information on BOMs in JSON see
https://tools.ietf.org/html/rfc7159#section-8.1; not allowed; to tie the
loop.

Wade


Re: Json validation

2019-04-22 Thread Mark Eggers
On 4/16/2019 10:23 AM, Greenberg, Gary wrote:
> I sure do have one. Here it is.
> 
> Gary Greenberg
> Staff Software Engineer
> Data Product Development, BI-A
> E: ggree...@visa.com
> M: 650-269-7902
> 
> [EmailSig-TaglineVersion]
> 
> From: Wade Chandler 
> Sent: Monday, April 15, 2019 6:23 PM
> To: Greenberg, Gary 
> Cc: 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 
> 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]

It looks like a BOM for UTF-8.

Are you downloading this on a Windows machine, and is the file generated
on a non-Windows machine?

I have added -J-Dfile.encoding=UTF-8 to almost the end of my
netbeans_default_options in netbeans.conf. The end option is for bigger
fonts.

The error shows up as an unrecognizable (at least to me) character at
the beginning of the file. Delete that character and the file validates.

. . . just my two cents
/mde/



signature.asc
Description: OpenPGP digital signature


RE: [EXT] RE: Json validation

2019-04-16 Thread Thomson, Duncan
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 ; 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 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 mailto:wadechand...@apache.org>>
Sent: Monday, April 15, 2019 6:23 PM
To: Greenberg, Gary 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 
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]



RE: [EXT] RE: Json validation

2019-04-16 Thread Thomson, Duncan
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 
Sent: Tuesday, April 16, 2019 1:24 PM
To: wadechand...@apache.org
Cc: 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 mailto:wadechand...@apache.org>>
Sent: Monday, April 15, 2019 6:23 PM
To: Greenberg, Gary 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 
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]



RE: Json validation

2019-04-16 Thread Greenberg, Gary
I sure do have one. Here it is.

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

[EmailSig-TaglineVersion]

From: Wade Chandler 
Sent: Monday, April 15, 2019 6:23 PM
To: Greenberg, Gary 
Cc: 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 
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]



request22.json
Description: request22.json

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Re: Json validation

2019-04-15 Thread Wade Chandler
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  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
>
> M: 650-269-7902
>
>
>
> [image: EmailSig-TaglineVersion]
>
>
>


Json validation

2019-04-15 Thread Greenberg, Gary
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
M: 650-269-7902

[EmailSig-TaglineVersion]