aka-demik / superobject

Automatically exported from https://code.google.com/p/superobject/
0 stars 1 forks source link

AsString method returns null value as "null", but should be '' #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Input: {"strField":null}
2. source: superobject.pas
3. function TSuperObject.AsString: SOString;

What is the expected output? What do you see instead?
expected output: ''; (empty string)
now: 'null'

What version of the product are you using? On what operating system?
superobjectv1.2.4

Please provide any additional information below.
amendment:
function TSuperObject.AsString: SOString;
begin
  if FDataType = stNull then
    Result := '' else
    if FDataType = stString then
      Result := FOString else
      Result := AsJSon(false, false);
end;

Original issue reported on code.google.com by alshesta...@gmail.com on 26 Apr 2013 at 11:44