[fpc-devel] TJSONDeStreamer can't handle such date format 'yyyy-MM-dd"T"hh:nn:ss"Z"'

Michael Van Canneyt michael at freepascal.org
Tue Jul 19 10:47:43 CEST 2016



On Tue, 19 Jul 2016, Dimitrios Chr. Ioannidis wrote:

> On 19/7/2016 10:54 πμ, Michael Van Canneyt wrote:
>>
>>
>> On Mon, 18 Jul 2016, Stéphane Wierzbicki wrote:
>>
>
> <snip>
>
>>> I have modified TJSONStreamer and TJSONDeStreamer class to handle 
>>> ISO8601
>>> dates by adding a new jsoDateTimeAsISO8601 option.
>>> Where can I send these modifications ?
>>
>> What version of FPC did you use ?
>>
>> The latest version of TJSONStreamer and TJSONDeStreameruse this format
>> already, check the jsoLegacyDateTime option.
>
> With fixes_3.0 branch rev. 34112 ( also in today's trunk ), the json 
> testsuite reports two failures :
>
> Number of run tests: 322
> Number of errors:    0
> Number of failures:  2
>
> List of failures:
>   Failure:
>     Message:           TTestJSONStreamer.TestWriteFloat4: "Correct 
> value" expected: <4,56> but was: <5>
>     Exception class:   EAssertionFailedError
>     Exception message: "Correct value" expected: <4,56> but was: <5>
>         at   $00434358  TTESTJSONSTREAMER__ASSERTPROP,  line 761 of 
> testjsonrtti.pp
>   Failure:
>     Message:           TTestJSONDeStreamer.TestFloat4: "Correct 
> extended value" expected: <5,67> but was: <6>
>     Exception class:   EAssertionFailedError
>     Exception message: "Correct extended value" expected: <5,67> but 
> was: <6>
>         at   $0043241F  TTESTJSONDESTREAMER__TESTFLOAT4,  line 374 of 
> testjsonrtti.pp

I am aware of this.

However, this is only on i386, on 64-bit the code runs fine.
I have no idea why, the code should be CPU agnostic.

I have not yet had the opportunity to debug it on a i386 machine.

Michael.


More information about the fpc-devel mailing list