Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread silvioprog
2013/2/28 Michael Van Canneyt 

>
> On Thu, 28 Feb 2013, silvioprog wrote:
>
>  2013/2/28 luiz americo pereira camara 
>>   2013/2/28 Michael Van Canneyt :
>>   >
>>   >
>>   > On Thu, 28 Feb 2013, silvioprog wrote:
>>   >
>>   >> Hello,
>>   >> Please see:
>>   >>
>>   >> 
>> http://bugs.freepascal.org/**view.php?id=23970
>>   >
>>   >
>>   > Fixed.
>>
>> Seems that you committed by accident code to make AsJSON output more
>> compact.
>>
>> This may lead to compatibility problems.
>>
>> Luiz
>>
>>
>> You touched on an important point. It would be nice to be able to
>> customize the output format of JSON. For example, currently
>> the fpjson format is this:
>>
>> { "foo" : "bar" }
>>
>> And I personally prefer:
>>
>> { "foo": "bar" }
>>
>> The latter format is what we see in all JavaScript libraries. :)
>>
>
> I will not change the default format. Whitespace is irrelevant anyway.
>
> But: If you want to customize the output, you can use the FormatJSON
> function. It has many options.
> If you think of additional formatting options for this method, you are
> welcome to provide a patch.
> But please note that all these wishes will have impact on speed.
>
> Michael.


You're right.

By default, the output could be uglify (without spaces). It is more fast.

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread Michael Van Canneyt



On Thu, 28 Feb 2013, silvioprog wrote:


2013/2/28 luiz americo pereira camara 
  2013/2/28 Michael Van Canneyt :
  >
  >
  > On Thu, 28 Feb 2013, silvioprog wrote:
  >
  >> Hello,
  >> Please see:
  >>
  >> http://bugs.freepascal.org/view.php?id=23970
  >
  >
  > Fixed.

Seems that you committed by accident code to make AsJSON output more compact.

This may lead to compatibility problems.

Luiz


You touched on an important point. It would be nice to be able to customize the 
output format of JSON. For example, currently
the fpjson format is this:

{ "foo" : "bar" }

And I personally prefer:

{ "foo": "bar" }

The latter format is what we see in all JavaScript libraries. :)


I will not change the default format. Whitespace is irrelevant anyway.

But: If you want to customize the output, you can use the FormatJSON function. 
It has many options.
If you think of additional formatting options for this method, you are welcome 
to provide a patch.
But please note that all these wishes will have impact on speed.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread silvioprog
2013/2/28 luiz americo pereira camara 

> 2013/2/28 Michael Van Canneyt :
> >
> >
> > On Thu, 28 Feb 2013, silvioprog wrote:
> >
> >> Hello,
> >> Please see:
> >>
> >> http://bugs.freepascal.org/view.php?id=23970
> >
> >
> > Fixed.
>
> Seems that you committed by accident code to make AsJSON output more
> compact.
>
> This may lead to compatibility problems.
>
> Luiz
>

You touched on an important point. It would be nice to be able to customize
the output format of JSON. For example, currently the fpjson format is this:

{ "foo" : "bar" }

And I personally prefer:

{ "foo": "bar" }

The latter format is what we see in all JavaScript libraries. :)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread Michael Van Canneyt



On Thu, 28 Feb 2013, luiz americo pereira camara wrote:


2013/2/28 Michael Van Canneyt :



On Thu, 28 Feb 2013, silvioprog wrote:


Hello,
Please see:

http://bugs.freepascal.org/view.php?id=23970



Fixed.



Seems that you committed by accident code to make AsJSON output more compact.

This may lead to compatibility problems.


You are right. I fixed this.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread luiz americo pereira camara
2013/2/28 Michael Van Canneyt :
>
>
> On Thu, 28 Feb 2013, silvioprog wrote:
>
>> Hello,
>> Please see:
>>
>> http://bugs.freepascal.org/view.php?id=23970
>
>
> Fixed.


Seems that you committed by accident code to make AsJSON output more compact.

This may lead to compatibility problems.

Luiz
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread silvioprog
2013/2/28 Michael Van Canneyt 

>  On Thu, 28 Feb 2013, silvioprog wrote:
>
>> Hello,
>> Please see:
>>
>> http://bugs.freepascal.org/**view.php?id=23970
>>
>
> Fixed.
>
> Michael.


Wow, very fast. Thank you very much buddy! :)

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread Michael Van Canneyt



On Thu, 28 Feb 2013, silvioprog wrote:


Hello,
Please see:

http://bugs.freepascal.org/view.php?id=23970


Fixed.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] FPJSON and float values.

2013-02-28 Thread silvioprog
Hello,

Please see:

http://bugs.freepascal.org/view.php?id=23970

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal