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

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -