Answer the question
In order to leave comments, you need to log in
How to add extra field when serializing JSON?
When serializing an object of any type, if the property of this object has a specific name, then you need to add an additional field and set its value.
Example:
class MyClass
{
public object Item;
}
{
"Item" : {},
"Item_Type" : "123"
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question