Skip to content

Instantly share code, notes, and snippets.

@danstuken
Created September 5, 2011 18:22
Show Gist options
  • Save danstuken/1195606 to your computer and use it in GitHub Desktop.
Save danstuken/1195606 to your computer and use it in GitHub Desktop.
Simple JsonFx Example
[TestFixture]
public class SomeTests{
[Test]
public void SimpleSingleItemDecodeTest()
{
var xml = " <subscription-plan>"
+ " <name>Plan 3</name>"
+ " <id type=\"integer\">3</id>"
+ " </subscription-plan>";
var reader =
new JsonFx.Xml.XmlReader(
new DataReaderSettings(
new ConventionResolverStrategy(ConventionResolverStrategy.WordCasing.Lowercase, "-")));
var data = reader.Read<SubscriptionPlan>(xml);
Assert.True(true);
}
}
public class SubscriptionPlan
{
public string Name { get; set; }
public int Id { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment