<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Hairy Pixels via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 28. Sep. 2022, 16:17:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok I narrowed down this bug I get with 3.2.2 to TJSONParser. <br>
<br>
I’m so confused as to what changed.  FormatJSON prints the JSON as expected but AsString crashes and gives the error I was seeing from the RPC which it trapped as an exception. When it’s send across the RPC layer it must call AsString and then blow up thus giving me this error.<br>
<br>
The JSON in question printed from FormatJSON is valid and can be opened in a JSON editor even so I know it’s ok.<br>
<br>
===========================<br>
<br>
Request := TJSONParser.Create(Content, DefaultOptions).Parse;<br>
<br>
writeln(Request.FormatJSON);  // this prints the JSON correctly (Request ClassName is TJSONObject)<br>
<br>
writeln(Request.AsString); <br>
<br>
gives this error:<br>
<br>
An unhandled exception occurred at $00000001050261A7:<br>
EJSON: Cannot convert data from object value<br>
  $00000001050261A7<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">How about you provide a more complete example instead of making us guess so that we can reproduce it? </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>