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
Post a Comment