Skip to content

morgankenyon/Ferris.Json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ferris.Json

A library for serializing and deserializing json.

Current status:

  • Handles a lot of the simple C# and json string use cases.
  • Does not handle more complex C# types
  • Does not handle invalid json string well

Usages

Serializing

var obj = new TestObject
{
    Property = "string"
};

var jsonString = JsonTransformer.Serialize(obj);

Deserializing

var jsonString = "{\"Property\":\"string\"}"

var obj = JsonTransformer.Deserialize<TestObject>(jsonString);

Code structure

  • /src - contains all source code for Ferris.Json
  • /test - contains all tests for Ferris.Json
  • /benchmark - contains benchmarks between Ferris.Json, Newtonsoft and System.Text.Json
  • /testProjects - contains projects I use to verify and test changes

Features

  • - serializing basic types
  • - serializing nested objects
  • - deserializing basic types
  • - deserializing nested object
  • - serializing IEnumerable of object types
  • - serializing IEnumerable of primitive (string, bool, etc) types
  • - serializing arrays ([])
  • - handling empty whitespace
  • - deserializing List types
  • - deserializing arrays ([])
  • - handle nulls while deserializing
  • - handling null values in C# while serializing
  • - handle nested quotes in strings
  • - Supporting enums
  • - add serialization options (pretty print, DateTime format, enums to strings, etc)
  • - Supporting data classes
  • - Supporting classes with constructors
  • - gracefully handling invalid json
  • - handle other types of whitespace (needed???)
  • - handle numbers with exponents
  • - deserializing IList types
  • - support hex
  • - c# dictionaries???
  • - other ienumerable types
  • - non generic data structures
  • - different input types (streams, etc)
  • - F# support

About

A json parsing library

Resources

License

Stars

Watchers

Forks

Packages

No packages published