I am working with a class called OrderParameterInfo:
class OrderParameterInfo {
Name: string;
Value: string;
My goal is to create a JSON string. When I use
JSON.stringify(OrderParameterInfo("foo_name", "foo_value"))
, it generates {"Name":"foo_name","Value":"foo_value"}
. However, I would like the output to resemble a python dictionary, like this: {"foo_name":"foo_value"}
.
Any suggestions on how I can achieve this?