Browse Source

Null -> null (B*y case sensitive languages)

git-svn-id: trunk@15342 -
michael 15 years ago
parent
commit
8ea5a59438

+ 1 - 1
packages/fcl-json/src/fpjson.pp

@@ -795,7 +795,7 @@ end;
 
 function TJSONnull.GetAsJSON: TJSONStringType;
 begin
-  Result:='Null';
+  Result:='null';
 end;
 
 function TJSONnull.GetAsString: TJSONStringType;

+ 3 - 3
packages/fcl-json/tests/testjsondata.pp

@@ -461,7 +461,7 @@ begin
   try
     TestJSONType(J,jtNull);
     TestItemCount(J,0);
-    TestJSON(J,'Null');
+    TestJSON(J,'null');
     TestIsNull(J,True);
     TestAsBoolean(J,False,True);
     TestAsInteger(J,0,true);
@@ -1292,7 +1292,7 @@ begin
     AssertEquals('J[0] is TJSONNull',TJSONNull,J[0].ClassType);
     AssertEquals('J.Nulls[0]=True',True,J.Nulls[0]);
     TestIsNull(J[0],true);
-    TestJSON(J,'[Null]');
+    TestJSON(J,'[null]');
   finally
     FreeAndNil(J);
   end;
@@ -1621,7 +1621,7 @@ begin
     AssertEquals('J[''a''] is TJSONNull',TJSONNull,J[A].ClassType);
     AssertEquals('J.Nulls[''a'']=True',True,J.Nulls[A]);
     TestIsNull(J[a],true);
-    TestJSON(J,'{ "'+a+'" : Null }');
+    TestJSON(J,'{ "'+a+'" : null }');
   finally
     FreeAndNil(J);
   end;

+ 5 - 5
packages/fcl-json/tests/testjsonparser.pp

@@ -116,11 +116,11 @@ Var
   J : TJSONData;
 
 begin
-  P:=TJSONParser.Create('Null');
+  P:=TJSONParser.Create('null');
   Try
     J:=P.Parse;
     If (J=Nil) then
-      Fail('Parse of Null fails');
+      Fail('Parse of null fails');
     TestJSONType(J,jtNull);
   Finally
     FreeAndNil(J);
@@ -200,7 +200,7 @@ Var
 
 begin
   DoTestArray('[]',0);
-  DoTestArray('[Null]',1);
+  DoTestArray('[null]',1);
   DoTestArray('[true]',1);
   DoTestArray('[false]',1);
   DoTestArray('[1]',1);
@@ -218,9 +218,9 @@ begin
   DoTestArray('["A string"]',1);
   DoTestArray('["A string", "Another string"]',2);
   DoTestArray('["A string", "Another string", "Yet another string"]',3);
-  DoTestArray('[Null, false]',2);
+  DoTestArray('[null, false]',2);
   DoTestArray('[true, false]',2);
-  DoTestArray('[Null, 1]',2);
+  DoTestArray('[null, 1]',2);
   DoTestArray('[1, "A string"]',2);
   DoTestArray('[1, []]',2);
   DoTestArray('[1, [1, 2]]',2);