json maaping question

david dabush

Ranch Hand

Posts: 40

posted 2 years ago

how to differ between fields that are not exists to fields that are null?
because in my api when someone wants to delete a field he sends null instead of a value. and if he doesnt want to effect this feild he doesnt send it.

Are you using any JSON parser libraries? For example., if you use the Jackson faster JSON parser, you can serialize and de-serialize your JSON's into objects and vice-versa. While doing so, you can specify on your object mapping to ignore null, unknown fields!

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!