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; /*from w w w .j a va 2 s . co m*/ import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONObject; import com.urucas.copynpaste.model.Post; public abstract class PostsParser { public static ArrayList<Post> parse(JSONArray jsonArray) { ArrayList<Post> _posts = new ArrayList<Post>(); for(int i = 0; i< jsonArray.length(); i++) { try { JSONObject jsonObject = jsonArray.getJSONObject(i); Post _post = PostParser.parse(jsonObject); if(_post != null) { _posts.add(_post); } }catch(Exception e) { } } return _posts; } }