This project has moved. For the latest updates, please go here.

Retrieve the object list of property names?

Jul 10, 2008 at 8:25 AM

I wan't to get the list of property names where [JsonProperty] is declared from an object.. Ex:

public class Product {
    public int Id { get; set; }

    public String Name { get; set; }

    public Float Price { get; set; }

    public int NotMe { get; set; }

Then I would wan't to get a list like this;
[{name: "Id"},{name: "Name"},{name:"Price", type:"float"}]

Aug 2, 2008 at 8:41 AM
You will need to write some custom code to query that information. Writing the JSON object can still be done using Json.NET however.