Marshaling objects to JSON shows internal properties

Description

When marshaling an object with renderdata in the json format, the $mixin property is part of the structure

event.renderData(data=object, format='json');

Gliffy Diagrams

Activity

Show:

Brad WoodSeptember 21, 2016 at 9:38 PM

I would disagree that it's impossible to know what properties shouldn't be part of the object. WireBox added those properties, so there's no reason why it can't be documented the list of special properties WireBox is going to add. It is, after all, our own code doing this so it's not like it's a black box. In fact, we can probably even get a list of injected keys dynamically from the mixer util at run time. Have the marshaller automatically exclude any keys that WireBox reports as being part of it's building process.

Luis MajanoSeptember 21, 2016 at 9:03 PM

The issue with this is that there is no way for us to know which properties we should or should not marshall. The best approach would be to have a memento representation in the object and send that to render instead of the object itself. Thoughts?

Won't Fix
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Affects versions

Priority

Sentry

Created October 21, 2015 at 9:18 AM
Updated September 21, 2016 at 9:38 PM
Resolved September 21, 2016 at 9:03 PM