Convert Json to string with escape character











up vote
0
down vote

favorite












I have JSON that i need to convert to string that contains the special characters. Here is the JSON i have:



[{
"job": {
"jobName": "Flight_Test_8",
"fields": {
"jobGroupName": "ObjectUploader",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectUploader",
"jobArgs": {
"ObjectUploader.Source.SourceAgent": "sig_NoWhere_corxf_ny!9",
"ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-sec01-smb.com\mxrepository\test\TEMP_test" t="d"></el></siglist>",
"ObjectUploader.Target.TargetAgent": "sig-dev-lnx-01.NOWHWERE.com",
"ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}",
"ObjectUploader.Schedule._sp_frequency": "once"
}
}
}
}


]



Now what i want to do is get this specific part of the JSON converted to a string with the escape characters as follows:



"ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


The reason i need this to be in a string format is because i am targeting accepts it in this manner. When i do JsonConvert.SerializeObject(jobList, Formatting.Indented); this is what i get:



[{
"job": {
"jobName": "Flight_Test",
"fields": {
"jobGroupName": "ObjectUploader",
"jobTemplateLibraryName": "Object_Mover_Workflows",
"jobTemplateName": "ObjectUploader",
"jobArgs": {
"ObjectUploader.Source.SourceAgent": "sig_windows",
"ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-se01.com\repo\test\test" t="d"></el></siglist>",
"ObjectUploader.Target.TargetAgent": "sig-dev.com",
"ObjectUploader.Target.TargetObjectStorage": {
"aws-s3-storage-access": {
"BucketName": "flight-test",
"SubFolder": "TestFolder",
"AccessKey": "PASSWORD",
"SecretKey": "PASSWORD",
"ProfileName": null,
"BucketId": 28716
}
},
"ObjectUploader.Schedule._sp_frequency": "none"
}
}
}


}
]



As you can see the ObjectUploader.Target.TargetObjectStorage gets serialized in the proper JSON format but the API cannot parse it in this manner, the only format the API accepts is the JSON with the newline character etc..:



"ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


The way i got the current format i need is through a online website but i was wondering if C# has some feature that would give me the result i need.










share|improve this question




























    up vote
    0
    down vote

    favorite












    I have JSON that i need to convert to string that contains the special characters. Here is the JSON i have:



    [{
    "job": {
    "jobName": "Flight_Test_8",
    "fields": {
    "jobGroupName": "ObjectUploader",
    "jobTemplateLibraryName": "Object_Mover_Workflows",
    "jobTemplateName": "ObjectUploader",
    "jobArgs": {
    "ObjectUploader.Source.SourceAgent": "sig_NoWhere_corxf_ny!9",
    "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-sec01-smb.com\mxrepository\test\TEMP_test" t="d"></el></siglist>",
    "ObjectUploader.Target.TargetAgent": "sig-dev-lnx-01.NOWHWERE.com",
    "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}",
    "ObjectUploader.Schedule._sp_frequency": "once"
    }
    }
    }
    }


    ]



    Now what i want to do is get this specific part of the JSON converted to a string with the escape characters as follows:



    "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


    The reason i need this to be in a string format is because i am targeting accepts it in this manner. When i do JsonConvert.SerializeObject(jobList, Formatting.Indented); this is what i get:



    [{
    "job": {
    "jobName": "Flight_Test",
    "fields": {
    "jobGroupName": "ObjectUploader",
    "jobTemplateLibraryName": "Object_Mover_Workflows",
    "jobTemplateName": "ObjectUploader",
    "jobArgs": {
    "ObjectUploader.Source.SourceAgent": "sig_windows",
    "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-se01.com\repo\test\test" t="d"></el></siglist>",
    "ObjectUploader.Target.TargetAgent": "sig-dev.com",
    "ObjectUploader.Target.TargetObjectStorage": {
    "aws-s3-storage-access": {
    "BucketName": "flight-test",
    "SubFolder": "TestFolder",
    "AccessKey": "PASSWORD",
    "SecretKey": "PASSWORD",
    "ProfileName": null,
    "BucketId": 28716
    }
    },
    "ObjectUploader.Schedule._sp_frequency": "none"
    }
    }
    }


    }
    ]



    As you can see the ObjectUploader.Target.TargetObjectStorage gets serialized in the proper JSON format but the API cannot parse it in this manner, the only format the API accepts is the JSON with the newline character etc..:



    "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


    The way i got the current format i need is through a online website but i was wondering if C# has some feature that would give me the result i need.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have JSON that i need to convert to string that contains the special characters. Here is the JSON i have:



      [{
      "job": {
      "jobName": "Flight_Test_8",
      "fields": {
      "jobGroupName": "ObjectUploader",
      "jobTemplateLibraryName": "Object_Mover_Workflows",
      "jobTemplateName": "ObjectUploader",
      "jobArgs": {
      "ObjectUploader.Source.SourceAgent": "sig_NoWhere_corxf_ny!9",
      "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-sec01-smb.com\mxrepository\test\TEMP_test" t="d"></el></siglist>",
      "ObjectUploader.Target.TargetAgent": "sig-dev-lnx-01.NOWHWERE.com",
      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}",
      "ObjectUploader.Schedule._sp_frequency": "once"
      }
      }
      }
      }


      ]



      Now what i want to do is get this specific part of the JSON converted to a string with the escape characters as follows:



      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


      The reason i need this to be in a string format is because i am targeting accepts it in this manner. When i do JsonConvert.SerializeObject(jobList, Formatting.Indented); this is what i get:



      [{
      "job": {
      "jobName": "Flight_Test",
      "fields": {
      "jobGroupName": "ObjectUploader",
      "jobTemplateLibraryName": "Object_Mover_Workflows",
      "jobTemplateName": "ObjectUploader",
      "jobArgs": {
      "ObjectUploader.Source.SourceAgent": "sig_windows",
      "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-se01.com\repo\test\test" t="d"></el></siglist>",
      "ObjectUploader.Target.TargetAgent": "sig-dev.com",
      "ObjectUploader.Target.TargetObjectStorage": {
      "aws-s3-storage-access": {
      "BucketName": "flight-test",
      "SubFolder": "TestFolder",
      "AccessKey": "PASSWORD",
      "SecretKey": "PASSWORD",
      "ProfileName": null,
      "BucketId": 28716
      }
      },
      "ObjectUploader.Schedule._sp_frequency": "none"
      }
      }
      }


      }
      ]



      As you can see the ObjectUploader.Target.TargetObjectStorage gets serialized in the proper JSON format but the API cannot parse it in this manner, the only format the API accepts is the JSON with the newline character etc..:



      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


      The way i got the current format i need is through a online website but i was wondering if C# has some feature that would give me the result i need.










      share|improve this question















      I have JSON that i need to convert to string that contains the special characters. Here is the JSON i have:



      [{
      "job": {
      "jobName": "Flight_Test_8",
      "fields": {
      "jobGroupName": "ObjectUploader",
      "jobTemplateLibraryName": "Object_Mover_Workflows",
      "jobTemplateName": "ObjectUploader",
      "jobArgs": {
      "ObjectUploader.Source.SourceAgent": "sig_NoWhere_corxf_ny!9",
      "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-sec01-smb.com\mxrepository\test\TEMP_test" t="d"></el></siglist>",
      "ObjectUploader.Target.TargetAgent": "sig-dev-lnx-01.NOWHWERE.com",
      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}",
      "ObjectUploader.Schedule._sp_frequency": "once"
      }
      }
      }
      }


      ]



      Now what i want to do is get this specific part of the JSON converted to a string with the escape characters as follows:



      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


      The reason i need this to be in a string format is because i am targeting accepts it in this manner. When i do JsonConvert.SerializeObject(jobList, Formatting.Indented); this is what i get:



      [{
      "job": {
      "jobName": "Flight_Test",
      "fields": {
      "jobGroupName": "ObjectUploader",
      "jobTemplateLibraryName": "Object_Mover_Workflows",
      "jobTemplateName": "ObjectUploader",
      "jobArgs": {
      "ObjectUploader.Source.SourceAgent": "sig_windows",
      "ObjectUploader.Source.Data": "<siglist type="filedir"><el v="\\is-us-se01.com\repo\test\test" t="d"></el></siglist>",
      "ObjectUploader.Target.TargetAgent": "sig-dev.com",
      "ObjectUploader.Target.TargetObjectStorage": {
      "aws-s3-storage-access": {
      "BucketName": "flight-test",
      "SubFolder": "TestFolder",
      "AccessKey": "PASSWORD",
      "SecretKey": "PASSWORD",
      "ProfileName": null,
      "BucketId": 28716
      }
      },
      "ObjectUploader.Schedule._sp_frequency": "none"
      }
      }
      }


      }
      ]



      As you can see the ObjectUploader.Target.TargetObjectStorage gets serialized in the proper JSON format but the API cannot parse it in this manner, the only format the API accepts is the JSON with the newline character etc..:



      "ObjectUploader.Target.TargetObjectStorage": "{"aws-s3-storage": {"bucket": "flight-gateway-test","subfolder": "","access-key": "AKIAJ6EPASSWORDV6TLPYV","secret-key":"eklmmlevkqfvcuPASSWORDtpmam","id": 28716,"name": "S3 AWS East"}"


      The way i got the current format i need is through a online website but i was wondering if C# has some feature that would give me the result i need.







      c# json serialization json.net






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 at 2:35









      John

      11k31736




      11k31736










      asked Nov 20 at 2:05









      codeApprentice

      63




      63
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You could create a converter to do this:



          private class StringObjectPropertyConverter<T> : JsonConverter
          {
          public override bool CanConvert(Type objectType)
          {
          return typeof(T) == objectType;
          }

          public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
          {
          if (reader.TokenType != JsonToken.String)
          {
          throw new Exception("Expected string");
          }
          var serialized = reader.Value.ToString();
          using (TextReader tr = new StringReader(serialized))
          {
          if (existingValue == null)
          {
          existingValue = serializer.Deserialize(tr, objectType);
          }
          else
          {
          serializer.Populate(tr, existingValue);
          }
          }
          return existingValue;
          }

          public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
          {
          StringBuilder sb = new StringBuilder();
          using (TextWriter tw = new StringWriter(sb))
          {
          serializer.Serialize(tw, value);
          }
          serializer.Serialize(writer, sb.ToString());
          }
          }


          Example usage:



          public class Person
          {
          public string Name { get; set; }
          public string Gender { get; set; }
          }

          public class Test
          {
          [JsonConverter(typeof(StringObjectPropertyConverter<Person>))]
          public Person Person { get; set; }
          }

          var testObj = new Test()
          {
          Person = new Person() { Name = "John", Gender = "Male" }
          };
          var serialized = Newtonsoft.Json.JsonConvert.SerializeObject(testObj);


          Produces JSON:



          {
          "Person": "{"Name":"John","Gender":"Male"}"
          }


          Likewise, it can also deserialzie this back to the object structure.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385205%2fconvert-json-to-string-with-escape-character%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            You could create a converter to do this:



            private class StringObjectPropertyConverter<T> : JsonConverter
            {
            public override bool CanConvert(Type objectType)
            {
            return typeof(T) == objectType;
            }

            public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
            {
            if (reader.TokenType != JsonToken.String)
            {
            throw new Exception("Expected string");
            }
            var serialized = reader.Value.ToString();
            using (TextReader tr = new StringReader(serialized))
            {
            if (existingValue == null)
            {
            existingValue = serializer.Deserialize(tr, objectType);
            }
            else
            {
            serializer.Populate(tr, existingValue);
            }
            }
            return existingValue;
            }

            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
            StringBuilder sb = new StringBuilder();
            using (TextWriter tw = new StringWriter(sb))
            {
            serializer.Serialize(tw, value);
            }
            serializer.Serialize(writer, sb.ToString());
            }
            }


            Example usage:



            public class Person
            {
            public string Name { get; set; }
            public string Gender { get; set; }
            }

            public class Test
            {
            [JsonConverter(typeof(StringObjectPropertyConverter<Person>))]
            public Person Person { get; set; }
            }

            var testObj = new Test()
            {
            Person = new Person() { Name = "John", Gender = "Male" }
            };
            var serialized = Newtonsoft.Json.JsonConvert.SerializeObject(testObj);


            Produces JSON:



            {
            "Person": "{"Name":"John","Gender":"Male"}"
            }


            Likewise, it can also deserialzie this back to the object structure.






            share|improve this answer



























              up vote
              0
              down vote













              You could create a converter to do this:



              private class StringObjectPropertyConverter<T> : JsonConverter
              {
              public override bool CanConvert(Type objectType)
              {
              return typeof(T) == objectType;
              }

              public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
              {
              if (reader.TokenType != JsonToken.String)
              {
              throw new Exception("Expected string");
              }
              var serialized = reader.Value.ToString();
              using (TextReader tr = new StringReader(serialized))
              {
              if (existingValue == null)
              {
              existingValue = serializer.Deserialize(tr, objectType);
              }
              else
              {
              serializer.Populate(tr, existingValue);
              }
              }
              return existingValue;
              }

              public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
              {
              StringBuilder sb = new StringBuilder();
              using (TextWriter tw = new StringWriter(sb))
              {
              serializer.Serialize(tw, value);
              }
              serializer.Serialize(writer, sb.ToString());
              }
              }


              Example usage:



              public class Person
              {
              public string Name { get; set; }
              public string Gender { get; set; }
              }

              public class Test
              {
              [JsonConverter(typeof(StringObjectPropertyConverter<Person>))]
              public Person Person { get; set; }
              }

              var testObj = new Test()
              {
              Person = new Person() { Name = "John", Gender = "Male" }
              };
              var serialized = Newtonsoft.Json.JsonConvert.SerializeObject(testObj);


              Produces JSON:



              {
              "Person": "{"Name":"John","Gender":"Male"}"
              }


              Likewise, it can also deserialzie this back to the object structure.






              share|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                You could create a converter to do this:



                private class StringObjectPropertyConverter<T> : JsonConverter
                {
                public override bool CanConvert(Type objectType)
                {
                return typeof(T) == objectType;
                }

                public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
                {
                if (reader.TokenType != JsonToken.String)
                {
                throw new Exception("Expected string");
                }
                var serialized = reader.Value.ToString();
                using (TextReader tr = new StringReader(serialized))
                {
                if (existingValue == null)
                {
                existingValue = serializer.Deserialize(tr, objectType);
                }
                else
                {
                serializer.Populate(tr, existingValue);
                }
                }
                return existingValue;
                }

                public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
                {
                StringBuilder sb = new StringBuilder();
                using (TextWriter tw = new StringWriter(sb))
                {
                serializer.Serialize(tw, value);
                }
                serializer.Serialize(writer, sb.ToString());
                }
                }


                Example usage:



                public class Person
                {
                public string Name { get; set; }
                public string Gender { get; set; }
                }

                public class Test
                {
                [JsonConverter(typeof(StringObjectPropertyConverter<Person>))]
                public Person Person { get; set; }
                }

                var testObj = new Test()
                {
                Person = new Person() { Name = "John", Gender = "Male" }
                };
                var serialized = Newtonsoft.Json.JsonConvert.SerializeObject(testObj);


                Produces JSON:



                {
                "Person": "{"Name":"John","Gender":"Male"}"
                }


                Likewise, it can also deserialzie this back to the object structure.






                share|improve this answer














                You could create a converter to do this:



                private class StringObjectPropertyConverter<T> : JsonConverter
                {
                public override bool CanConvert(Type objectType)
                {
                return typeof(T) == objectType;
                }

                public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
                {
                if (reader.TokenType != JsonToken.String)
                {
                throw new Exception("Expected string");
                }
                var serialized = reader.Value.ToString();
                using (TextReader tr = new StringReader(serialized))
                {
                if (existingValue == null)
                {
                existingValue = serializer.Deserialize(tr, objectType);
                }
                else
                {
                serializer.Populate(tr, existingValue);
                }
                }
                return existingValue;
                }

                public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
                {
                StringBuilder sb = new StringBuilder();
                using (TextWriter tw = new StringWriter(sb))
                {
                serializer.Serialize(tw, value);
                }
                serializer.Serialize(writer, sb.ToString());
                }
                }


                Example usage:



                public class Person
                {
                public string Name { get; set; }
                public string Gender { get; set; }
                }

                public class Test
                {
                [JsonConverter(typeof(StringObjectPropertyConverter<Person>))]
                public Person Person { get; set; }
                }

                var testObj = new Test()
                {
                Person = new Person() { Name = "John", Gender = "Male" }
                };
                var serialized = Newtonsoft.Json.JsonConvert.SerializeObject(testObj);


                Produces JSON:



                {
                "Person": "{"Name":"John","Gender":"Male"}"
                }


                Likewise, it can also deserialzie this back to the object structure.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 20 at 2:31

























                answered Nov 20 at 2:16









                John

                11k31736




                11k31736






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385205%2fconvert-json-to-string-with-escape-character%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Costa Masnaga

                    Fotorealismo

                    Sidney Franklin