You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vxquery.apache.org by Preston Carman <pr...@apache.org> on 2016/06/12 15:22:48 UTC

JSON Result and Whitespace

How should we print JSON results? JSON ignores whitespace, yet adding
some to the result can make if more readable. Do you think we should
leave whitespace out of our result for add some for readability?

Example without whitespace:
{"software":"VXQuery","version":0.7,"contributors":["Riyafa","Menaka","Chirstina"]}

Example with whitespace:
{ "software" : "VXQuery", "version" : 0.7, "contributors" : [
"Riyafa", "Menaka", "Chirstina" ] }

Thoughts?

Re: JSON Result and Whitespace

Posted by Preston Carman <pr...@apache.org>.
Let's start with no whitespace for JSON and later if needed we can
make an optional pretty print version.

On Mon, Jun 13, 2016 at 4:41 AM, Riyafa Abdul Hameed
<ri...@cse.mrt.ac.lk> wrote:
> Hi,
>
> In my case I considered that if we add whitespaces in the JSON result then
> it should be specified where to add them. Also most JSON dumps I have
> encountered do not have whitespaces in them.
>
> Thank you.
>
> Yours sincerely,
> Riyafa
>
> On 12 June 2016 at 20:52, Preston Carman <pr...@apache.org> wrote:
>
>> How should we print JSON results? JSON ignores whitespace, yet adding
>> some to the result can make if more readable. Do you think we should
>> leave whitespace out of our result for add some for readability?
>>
>> Example without whitespace:
>>
>> {"software":"VXQuery","version":0.7,"contributors":["Riyafa","Menaka","Chirstina"]}
>>
>> Example with whitespace:
>> { "software" : "VXQuery", "version" : 0.7, "contributors" : [
>> "Riyafa", "Menaka", "Chirstina" ] }
>>
>> Thoughts?
>>
>
>
>
> --
> Riyafa Abdul Hameed
> Undergraduate, University of Moratuwa
>
> Email: riyafa.12@cse.mrt.ac.lk
> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
> <http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
> <http://twitter.com/Riyafa1>

Re: JSON Result and Whitespace

Posted by Riyafa Abdul Hameed <ri...@cse.mrt.ac.lk>.
Hi,

In my case I considered that if we add whitespaces in the JSON result then
it should be specified where to add them. Also most JSON dumps I have
encountered do not have whitespaces in them.

Thank you.

Yours sincerely,
Riyafa

On 12 June 2016 at 20:52, Preston Carman <pr...@apache.org> wrote:

> How should we print JSON results? JSON ignores whitespace, yet adding
> some to the result can make if more readable. Do you think we should
> leave whitespace out of our result for add some for readability?
>
> Example without whitespace:
>
> {"software":"VXQuery","version":0.7,"contributors":["Riyafa","Menaka","Chirstina"]}
>
> Example with whitespace:
> { "software" : "VXQuery", "version" : 0.7, "contributors" : [
> "Riyafa", "Menaka", "Chirstina" ] }
>
> Thoughts?
>



-- 
Riyafa Abdul Hameed
Undergraduate, University of Moratuwa

Email: riyafa.12@cse.mrt.ac.lk
Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/>
<http://facebook.com/riyafa.ahf>  <http://lk.linkedin.com/in/riyafa>
<http://twitter.com/Riyafa1>