• Post Reply Bookmark Topic Watch Topic
  • New Topic

org.json.JSONObject parse phone number as integer  RSS feed

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have the following code snippet:
JSONObject is a org.json.JSONObject (I can't use GSON)

But when I recover the  dcDataAsJSONObject.get(keyName); with keyName = Phone
I recover a Integer with 673138793
I need to recover my phone as a String with "0673138793"  ...
Do you know a means to do that ?

Best regarde Adrian
 
Greenhorn
Posts: 2
  • X Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Adrien :
use : instead of  = in dcDataFieldValuesStr field
the code bellow could help you

ouput  is : 0673138793
good luck
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!