<div dir="ltr"><div><div>Hello,<br><br></div>I'm working with the TJSONStreamer and TJSONDeStreamer class. I need to exchange JSON object with a REST server. Date needs to be formatted this way : 'yyyy-MM-dd"T"hh:nn:ss"Z"' <br></div><div>Here is what I've done :<br></div><div><br></div><div style="font:1em/1.2em monospace;margin:0px;padding:0px;background:transparent none repeat scroll 0% 0%;vertical-align:top"><span style="color:rgb(0,102,0)">Streamer</span><span style="color:rgb(0,0,102)">.</span><span style="color:rgb(0,102,0)">Options</span> <span style="color:rgb(0,0,102)">:</span><span style="color:rgb(0,0,102)">=</span> Streamer<span style="color:rgb(0,0,102)">.</span><span style="color:rgb(0,102,0)">Options</span> <span style="color:rgb(0,0,102)">+</span> <span style="color:rgb(0,153,0)">[</span>jsoDateTimeAsString <span style="color:rgb(0,0,102)">,</span>jsoUseFormatString<span style="color:rgb(0,153,0)">]</span><span style="color:rgb(0,0,102)">;</span></div><div style="font:1em/1.2em monospace;margin:0px;padding:0px;background:transparent none repeat scroll 0% 0%;vertical-align:top">Streamer<span style="color:rgb(0,0,102)">.</span><span style="color:rgb(0,102,0)">DateTimeFormat</span> <span style="color:rgb(0,0,102)">:</span><span style="color:rgb(0,0,102)">=</span> 'yyyy-MM-dd"T"hh:nn:ss"Z"';
<span style="color:rgb(128,128,128);font-style:italic">//ISO8601</span></div><div style="font:1em/1.2em monospace;margin:0px;padding:0px;background:transparent none repeat scroll 0% 0%;vertical-align:top">JSONString <span style="color:rgb(0,0,102)">:</span><span style="color:rgb(0,0,102)">=</span> Streamer<span style="color:rgb(0,0,102)">.</span><span style="color:rgb(0,102,0)">ObjectToJSONString</span><span style="color:rgb(0,153,0)">(</span>MyObject<span style="color:rgb(0,153,0)">)</span><span style="color:rgb(0,0,102)">;</span></div><div style="font:1em/1.2em monospace;margin:0px;padding:0px;background:transparent none repeat scroll 0% 0%;vertical-align:top"><span style="color:rgb(0,0,102)">....</span></div><div style="font:1em/1.2em monospace;margin:0px;padding:0px;background:transparent none repeat scroll 0% 0%;vertical-align:top"><span style="color:rgb(0,102,0)">DeStreamer</span><span style="color:rgb(0,0,102)">.</span><span style="color:rgb(0,102,0)">JSONToObject</span><span style="color:rgb(0,153,0)">(</span>JSONString <span style="color:rgb(0,0,102)">,</span> MyObject<span style="color:rgb(0,153,0)">)</span><span style="color:rgb(0,0,102)">;</span> <<span style="color:rgb(0,0,102)">=</span> Exception <span style="color:rgb(0,0,102)"></span> </div><div>
</div><div><br>I'm getting an exception when converting my string to the object again. TJSONDeStreamer failed to convert this format back to 'yyyy-MM-dd"T"hh:nn:ss"Z".
<div><div><br>I have modified TJSONStreamer and TJSONDeStreamer class to handle ISO8601 dates by adding a new jsoDateTimeAsISO8601 option.<br>Where can I send these modifications ?
<br></div></div></div></div>