From 89172eaf33ce7fed1ac304089a47aa46a5735657 Mon Sep 17 00:00:00 2001 From: stanislavpetkov Date: Thu, 17 Sep 2015 16:09:09 +0200 Subject: [PATCH 1/3] Export string with CR, LF or CRLF did break the JSON --- superobject.pas | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; From 3b5575fcea6cb57c350a7bef5d7c6afde47d5179 Mon Sep 17 00:00:00 2001 From: Stanislav Petkov Date: Wed, 21 Oct 2015 15:47:05 +0300 Subject: [PATCH 2/3] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf582c6..4291c74 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SuperObject + # SuperObject ## What is JSON ? From f440d1b26b7b2897e17995bc646d0c8cf4895164 Mon Sep 17 00:00:00 2001 From: Stanislav Petkov Date: Wed, 21 Oct 2015 15:48:23 +0300 Subject: [PATCH 3/3] teset --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4291c74..aef6a4f 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ begin obj.AsArray[item] ``` -## RTTI & marshalling in Delphi 2010 +## RTTI & marshalling in Delphi 2010 ```pas type