default_context.go
func (d *DefaultContext) MarshalJSON() ([]byte, error) {
	m := map[string]interface{}{}
	data := d.Data()
	for k, v := range data {
		// don't try and marshal ourself
		if _, ok := v.(*DefaultContext); ok {
			continue
		}
		if _, err := json.Marshal(v); err == nil {
			// it can be marshaled, so add it:
			m[k] = v
		}
	}
	return json.Marshal(m)
}
func (d *DefaultContext) MarshalJSON() ([]byte, error) {
	m := map[string]interface{}{}
	data := d.Data()
	for k, v := range data {
		// don't try and marshal ourself
		if _, ok := v.(*DefaultContext); ok {
			continue
		}
		if _, err := json.Marshal(v); err == nil {
			// it can be marshaled, so add it:
			m[k] = v
		}
	}
	return json.Marshal(m)
}
func ( d * DefaultContext ) MarshalJSON ( ) ( [ ] byte , error ) { m := map [ string ] interface { } { } data := d . Data ( ) for k , v := range data { // don't try and marshal ourself if _ , ok := v . ( * DefaultContext ) ; ok { continue } if _ , err := json . Marshal ( v ) ; err == nil { // it can be marshaled, so add it: m [ k ] = v } } return json . Marshal ( m ) }
// MarshalJSON implements json marshaling for the context
MarshalJSON implements json marshaling for the context