foam-framework / foam

Feature-Oriented Active Modeller
Apache License 2.0
787 stars 55 forks source link

JSONUtil sends default values when they've been explicitly set #483

Closed bshepherdson closed 8 years ago

bshepherdson commented 8 years ago

This shows up in the new demo page. Note that it's fine if the object doesn't hasOwnProperty, but once it's been set to be the same as the defaultValue then it gets sent over the wire.

XMLUtil, by contrast, is comparing against the defaultValue and only sending the property if they differ.

I'm not sure what the intended behavior is, but either way one of them is doing it wrong.