0

I am serializing an object to a json.

string output = JsonConvert.SerializeObject(item) 

public class Item
{
    public int name;
    public string category;
}

output 
[ 
    { 
      "Name": "Item1", 
      "category": "Free", 
     }, 
] 

in the serialized string I want to have a ref to the schema defined for the json file

output 
[ 
    { 
      "$schema": "http://www.example.com/itemModel.json#",
      "Name": "Item1", 
      "category": "Free", 
     }, 
] 
Jim Hewitt
  • 1,726
  • 4
  • 24
  • 26
PickUpTruck
  • 63
  • 1
  • 5

0 Answers0