Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!