trying json serialization instead of marshaling