Updated marshalling to support json badgerfish