Value and Object now conform to the json.Marshaler interface and produce the
correct JSON when passed (directly or indirectly) to json.Marshal().
Before, both types would marshal as "{}" because they're structs with no public
fields.
This fixes some nasty problems marshaling object trees that mix Go and JS
collections. This can happen when you pass a Go collection into a JS function,
which modifies it adding JS values; and then back in Go you marshal the
collection to JSON. Before this commit the JS values would marshal to "{}".
(The new unit test TestNestedJSONMarshaling demonstrates this.)
Value and Object now conform to the json.Marshaler interface and produce the correct JSON when passed (directly or indirectly) to json.Marshal().
Before, both types would marshal as "{}" because they're structs with no public fields.
This fixes some nasty problems marshaling object trees that mix Go and JS collections. This can happen when you pass a Go collection into a JS function, which modifies it adding JS values; and then back in Go you marshal the collection to JSON. Before this commit the JS values would marshal to "{}". (The new unit test TestNestedJSONMarshaling demonstrates this.)
Fixes #262