Skip to content

Instantly share code, notes, and snippets.

@JavierCane
Created June 11, 2013 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JavierCane/5757337 to your computer and use it in GitHub Desktop.
Save JavierCane/5757337 to your computer and use it in GitHub Desktop.
parse attribute into hashmap
private static HashMap<String, String> getAttribute( JSONObject attributesJson )
{
HashMap<String, String> attribute = new HashMap<String, String>();
try
{
attribute.put( "key", attributesJson.getString( "key" ) );
attribute.put( "value", attributesJson.getString( "value" ) );
}
catch ( JSONException e )
{
e.printStackTrace();
}
return attribute;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment