I have the below properties of an object:
public string SenderAccount { get; set; }
public string ReceiverAccount { get; set; }
public decimal Amount { get; set; }
public string Currency { get; set; }
public Info Info { get; set; }
And I want to have an output like this:
{ "sender_account":"1753154",
"receiver_account":"1753242",
"amount":15,
"currency":"USD",
"test":1,
"key":"_MERCHANT_KEY_",
"ts":_TIMESTAMP_,
"sign":"_SIGN_"
}
Where test,key,ts and sign, belong to Info object. Now I want to skip this part:
1."Info":
2.{
3. "test":0,
4. "key":"mkey",
5. "ts":time_stamp,
6. "sign":"signature"
7.}
But to output only Info
variables.
Reason is that from api documentation provided they use all time those Info variables to request.
Edit: I need to skip rows 1,2,7 during serialization.