How to convert ParseObject to Json or JSONObject in android

Hello,

How can you convert ParseObject to json or JSONObject? I tried convert using GSON, but it wasn’t successful.

I need this because Parcelable return erro(Class not found when unmarshalling:com.parse.ParseGeoPoint) when I get in bundle.

Does anyone have any idea about this?

Thanksss!!

I think ideally you would create an object that extended ParseObject. You create getters and setters that would access the ParseObject properties. This would allow you to use Gson.

There’s is more information on how to extend a ParseObject in the documentation.

1 Like

In my case, i need the pure parseObject for other actions,if i create a new class extends parseObject ,will broken other things :frowning:

If you extend, add no extra functionality, then it still technically would be a ParseObject. It would simply act as a wrapper.

1 Like