{"id":15823898,"url":"https://github.com/stefh/jsonconverter","last_synced_at":"2025-10-03T22:04:32.301Z","repository":{"id":56741048,"uuid":"524164600","full_name":"StefH/JsonConverter","owner":"StefH","description":"Common interface for Json Converters (Newtonsoft.Json, System.Text.Json, SimpleJson and more)","archived":false,"fork":false,"pushed_at":"2025-06-13T17:15:42.000Z","size":130,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T18:29:23.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["StefH"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":["https://www.paypal.me/stefheyenrath"]}},"created_at":"2022-08-12T17:02:00.000Z","updated_at":"2025-06-13T17:15:46.000Z","dependencies_parsed_at":"2023-12-25T12:03:50.105Z","dependency_job_id":"55c4103c-51a4-4846-b829-bc1cb6f72db0","html_url":"https://github.com/StefH/JsonConverter","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":0.3076923076923077,"last_synced_commit":"f503c4c53dcee7e7a90a60442431455fc355120c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/StefH/JsonConverter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FJsonConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FJsonConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FJsonConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FJsonConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefH","download_url":"https://codeload.github.com/StefH/JsonConverter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefH%2FJsonConverter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260424828,"owners_count":23007049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T08:24:03.420Z","updated_at":"2025-10-03T22:04:32.196Z","avatar_url":"https://github.com/StefH.png","language":"C#","funding_links":["https://github.com/sponsors/StefH","https://www.paypal.me/stefheyenrath"],"categories":[],"sub_categories":[],"readme":"# JsonConverter\n\nCommon interface + implementation for Json Converters:\n- [Newtonsoft.Json](https://www.newtonsoft.com/json)\n- [System.Text.Json](https://docs.microsoft.com/en-us/dotnet/api/system.text.json)\n- [SimpleJson](https://github.com/facebook-csharp-sdk/simple-json)\n- [NetJSON](https://github.com/rpgmaker/NetJSON)\n- [Utf8Json](https://github.com/neuecc/Utf8Json)\n- [XUtf8Json](https://github.com/geeking/Utf8Json)\n- [ServiceStack.Text](https://docs.servicestack.net/json-format)\n- [Argon](https://github.com/SimonCropp/Argon)\n\n## NuGets\n\n| Name | Version |\n| - | - |\n| **JsonConverter.Abstractions** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.Abstractions)](https://www.nuget.org/packages/JsonConverter.Abstractions)\n| **JsonConverter.Newtonsoft.Json** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.Newtonsoft.Json)](https://www.nuget.org/packages/JsonConverter.Newtonsoft.Json)\n| **JsonConverter.System.Text.Json** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.System.Text.Json)](https://www.nuget.org/packages/JsonConverter.System.Text.Json)\n| **JsonConverter.SimpleJson** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.SimpleJson)](https://www.nuget.org/packages/JsonConverter.SimpleJson)\n| **JsonConverter.NetJSON** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.NetJSON)](https://www.nuget.org/packages/JsonConverter.NetJSON)\n| **JsonConverter.Utf8Json** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.Utf8Json)](https://www.nuget.org/packages/JsonConverter.Utf8Json)\n| **JsonConverter.XUtf8Json** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.XUtf8Json)](https://www.nuget.org/packages/JsonConverter.XUtf8Json)\n| **JsonConverter.ServiceStack.Text** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.ServiceStack.Text)](https://www.nuget.org/packages/JsonConverter.ServiceStack.Text)\n| **JsonConverter.Argon** | [![NuGet Badge](https://img.shields.io/nuget/v/JsonConverter.Argon)](https://www.nuget.org/packages/JsonConverter.Argon)\n\n\n## Interfaces\n\n### IJsonConverter\n\n``` csharp\npublic interface IJsonConverter\n{\n    Task\u003cT?\u003e DeserializeAsync\u003cT\u003e(Stream stream, IJsonConverterOptions? options = null, CancellationToken cancellationToken = default);\n\n    T? Deserialize\u003cT\u003e(Stream stream, IJsonConverterOptions? options = null);\n\n    T? Deserialize\u003cT\u003e(string text, IJsonConverterOptions? options = null);\n\n    object? Deserialize(string text, Type type, JsonConverterOptions? options = null);\n\n    Task\u003cstring\u003e SerializeAsync(object source, IJsonConverterOptions? options = null, CancellationToken cancellationToken = default);\n\n    string Serialize(object source, IJsonConverterOptions? options = null);\n\n    Task SerializeAsync(Stream stream, object value, JsonConverterOptions? options = null, CancellationToken cancellationToken = default);\n\n    Task\u003cbool\u003e IsValidJsonAsync(Stream stream, CancellationToken cancellationToken = default);\n\n    Task\u003cbool\u003e IsValidJsonAsync(string input, CancellationToken cancellationToken = default);\n\n    bool IsValidJson(Stream stream);\n\n    bool IsValidJson(string input);\n\n    /// \u003csummary\u003e\n    /// Convert an object to a DynamicJsonClass or DynamicJsonClass-array. \n    /// \u003c/summary\u003e.\n    /// \u003cparam name=\"value\"\u003eThe object (e.g. JObject in case of Newtonsoft.Json).\u003c/param\u003e\n    /// \u003cparam name=\"options\"\u003eThe \u003csee cref=\"DynamicJsonClassOptions\"/\u003e (optional).\u003c/param\u003e\n    /// \u003creturns\u003eobject, DynamicJsonClass or DynamicJsonClass-array\u003c/returns\u003e\n    object? ConvertToDynamicJsonClass(object value, DynamicJsonClassOptions? options = null);\n\n    /// \u003csummary\u003e\n    /// Convert Json Text to a DynamicJsonClass or DynamicJsonClass-array. \n    /// \u003c/summary\u003e.\n    /// \u003cparam name=\"text\"\u003eThe Json Text.\u003c/param\u003e\n    /// \u003cparam name=\"options\"\u003eThe \u003csee cref=\"DynamicJsonClassOptions\"/\u003e (optional).\u003c/param\u003e\n    /// \u003creturns\u003eobject, DynamicJsonClass or DynamicJsonClass-array\u003c/returns\u003e\n    object? DeserializeToDynamicJsonClass(string text, DynamicJsonClassOptions? options = null);\n```\n\n\n### JsonConverterOptions\n\n``` csharp\npublic class JsonConverterOptions\n{\n    public bool PropertyNameCaseInsensitive { get; set; }\n\n    public bool WriteIndented { get; set; }\n\n    public bool IgnoreNullValues { get; set; }\n}\n```\n\n### JsonConverterOptions\n\n``` csharp\npublic class DynamicJsonClassOptions\n{\n    public JsonConverterOptions? JsonConverterOptions { get; set; }\n\n    public IntegerBehavior IntegerConvertBehavior { get; set; } = IntegerBehavior.UseLong;\n\n    public FloatBehavior FloatConvertBehavior { get; set; } = FloatBehavior.UseDouble;\n}\n```\n\n## Sponsors\n\n[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=StefH) and [Dapper Plus](https://dapper-plus.net/?utm_source=StefH) are major sponsors and proud to contribute to the development of **JsonConverter**.\n\n[![Entity Framework Extensions](https://raw.githubusercontent.com/StefH/resources/main/sponsor/entity-framework-extensions-sponsor.png)](https://entityframework-extensions.net/bulk-insert?utm_source=StefH)\n\n[![Dapper Plus](https://raw.githubusercontent.com/StefH/resources/main/sponsor/dapper-plus-sponsor.png)](https://dapper-plus.net/bulk-insert?utm_source=StefH)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fjsonconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefh%2Fjsonconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefh%2Fjsonconverter/lists"}