diff --git a/README.md b/README.md index bf582c6..aef6a4f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SuperObject + # SuperObject ## What is JSON ? @@ -162,7 +162,7 @@ begin obj.AsArray[item] ``` -## RTTI & marshalling in Delphi 2010 +## RTTI & marshalling in Delphi 2010 ```pas type diff --git a/superobject.pas b/superobject.pas index 32206a8..aa22828 100644 --- a/superobject.pas +++ b/superobject.pas @@ -1881,6 +1881,22 @@ TByteChar = record inc(pos); start_offset := pos; end; + #13: + begin + if(pos - start_offset > 0) then + Append(str + start_offset, pos - start_offset); + Append(ESC_CR, 2); + inc(pos); + start_offset := pos; + end; + #10: + begin + if(pos - start_offset > 0) then + Append(str + start_offset, pos - start_offset); + Append(ESC_LF, 2); + inc(pos); + start_offset := pos; + end; else inc(pos); end;