I had to write some java code that used JSON format for the final out but did so with out using files:
Here was the soulition to make this happen
while(counter < numOfTags)
{
if(outList[counter].getType() == 0)
temp.addProperty(outList[counter].getTagName(),outList[counter].getFloatData());
else
temp.addProperty(outList[counter].getTagName(),outList[counter].getStringData());
counter++;
}
String outputString = mySon.toJson(temp);
notes:
int counter;
Device[] outList;
Gson mySon = new Gson();
JsonObject temp = new JsonObject();
int numOfTags;
I started this blog as a personal notepad, but it seems I'm getting more and more hits. Since people are reading this I starting sharing anything that I find interesting or usfull. I'm currently dedicating my time to expanding my knowledge into the more modern languages and ideas. If you find this information useful or a waste of your tome let me know by leaving commits or using the google +1 function at the bottom of the post. Thanks for viewing Daniel Haro
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Saturday, August 11, 2012
Subscribe to:
Posts (Atom)