Back to project page cnp.
The source code is released under:
MIT License
If you think the Android project cnp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.urucas.copynpaste.parser; // w w w.jav a 2 s .co m import org.json.JSONObject; import com.urucas.copynpaste.model.Post; public abstract class PostParser { public static Post parse(JSONObject jsonObject) { try { int id = jsonObject.getInt("id"); String data = jsonObject.getString("data"); String fecha = jsonObject.getString("fecha"); return new Post(id, data, fecha); }catch(Exception e) { return null; } } }