java - Gson, how should I treat a backslashes while deserializing json to objects? -


i'm using google gson 2.3.1 library.
when receive following json string:

 {"pc" : "domain\host"} 

i receive in pojo domainhost string without backslash. correct way deal it?

  1. ask serializer man add escape backslash domain\\host?
  2. check backslashes on side , insert escaping backslash prior deserializing?
  3. maybe gson library know deal it?

didn't find not in manual neither in google can me. tend choose 2nd option, not sure it's idea.

thank you.


Comments

Popular posts from this blog

java - JavaScript + Thymeleaf - select onchange -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

node.js - Using Node without global install -