// ValueAsJSON returns the current value as an interface{} in it's JSON representation.
ValueAsJSON returns the current value as an interface{} in it's JSON representation.
// ValueAsJSON returns the current value as an interface {} in it ' s JSON representation .
func (vr *StructValueIterator) ValueAsJSON() (interface{}, error) {
	if vr.ref.IsNull(vr.index) {
		return nil, nil
	}
	obj := make(map[string]interface{})
	for i, fieldIterator := range vr.fieldIterators {
		jsonValue, err := fieldIterator.ValueAsJSON()
		if err != nil {
			return nil, err
		}
		obj[vr.fieldNames[i]] = jsonValue
	}
	return obj, nil
}
func ( vr * StructValueIterator ) ValueAsJSON ( ) ( interface { } , error ) { if vr . ref . IsNull ( vr . index ) { return nil , nil } obj := make ( map [ string ] interface { } ) for i , fieldIterator := range vr . fieldIterators { jsonValue , err := fieldIterator . ValueAsJSON ( ) if err != nil { return nil , err } obj [ vr . fieldNames [ i ] ] = jsonValue } return obj , nil }
ValueAsJSON returns the current value as an interface{} in it's JSON representation.
ValueAsJSON returns the current value as an interface {} in it ' s JSON representation .