You are not logged in.
Pages: 1
Hi there,
I am trying to generate some JSON using DocVariant. I am using the following test app (using Delphi 6 - seems to work fine in Delphi 7):
program test1;
{$APPTYPE CONSOLE}
uses
SynCommons,
SysUtils;
var
LTest : Variant;
begin
LTest := _ObjFast( [] );
LTest.prop := 'VALUE';
DocVariantData( LTest ).AddValue( 'prop2', 'VALUE2' );
Writeln( LTest );
Readln;
end.
Previously (I have confirmed by going back to an older version) the following was output:
{"prop":"VALUE","prop2":"VALUE2"}
Using the latest version I get the following:
{"PROP":"VALUE","prop2":"VALUE2"}
Unfortunately the service processing this JSON in case sensitive so I can't send the uppercased version through.
Thanks,
Bernd
Offline
Indeed.
I've re-activated our SynCommons.pas fix for Delphi 6 variants.pas unit to circumvent the bug, which is in variants.pas.
In Delphi 6 official Variants.pas unit, you have the following:
LIdent := Uppercase()
in TInvokeableVariantType.DispInvoke(), which breaks our expectations.
Offline
Thank you so much! Updating to latest:)
Offline
Pages: 1