json - Android JSONObject skipping null value while creating -


i want send jsonobject mobile server in android. there null values want send.

i have tried following both way skipping null values.

tempjsonvaluesorder.put(databasehelper.order_others, ordercursor.isnull(ordercursor.getcolumnindex(databasehelper.order_others)) ? null :ordercursor.getstring(ordercursor.getcolumnindex(databasehelper.order_others))); 

is there way put null value in jsonobject?

help appreciated.

after found solution like:

tempjsonvaluesorder.put(databasehelper.order_transport, ordercursor.isnull(ordercursor.getcolumnindex(databasehelper.order_transport)) ? "" :ordercursor.getstring(ordercursor.getcolumnindex(databasehelper.order_transport))); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -