Skip to content

wipiano/Utf8Json.Jsonp

Repository files navigation

Utf8Json.Jsonp

Fast JSONP Serializer powered by primitive API of Utf8Json.

Install

This library availables for .NET Standard 2.0 only.

Nuget:

Install-Package Utf8Json.Jsonp

QuickStart

var p = new Person { Age = 99, Name = "foobar" };
var callback = "callbackFunc";

// result: callbackFunc({"Age":99,"Name":"foobar"});

// obj -> byte[]
byte[] bytes = Jsonp.Serialize(callback, p);

// write to stream
using (var stream = new MemoryStream())
{
    Jsonp.Serialize(stream, callback, p);
}

TODO:

  • Dynamic Serialization
  • AspNetCoreMvcFormatter

About

fast JSONP serializer powered by Utf8Json

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages