delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

Can you add a method to use a JSONObject or JSONArray or JSON String instead of an array of objects? #145

Open jahirfiquitiva opened 6 years ago

jahirfiquitiva commented 6 years ago

So basically, instead of using an array of objects for calls, subscriptions and others, we could use either a JSONObject or JSONArray or JSON text as String when calling the call or subscribe methods, and the toString() method of the first 2 things could do what we already have.

Right now, I find it really annoying that I have to create new objects for every type of call I want to do, this would come very very handy and I hope you consider adding it. Thank you.

ocram commented 6 years ago

How could this ever be easier to write (and read) in code?

Could you show some example calls with both the current syntax and your proposed syntax so that we can see how it’s better?

Thanks!