Skip to content

Commit 35d22f0

Browse files
committed
AUS-1026: Add the jsmn copyright and permission notice
JsmnTokenizer.cs is a C# port of jsmn (MIT, copyright 2010 Serge A. Zaitsev). The origin was named in comments and docs but the copyright and permission notice the MIT license requires was not in the tree or the package. THIRD-PARTY-NOTICES.txt at the repository root carries the notice and names the derived file; it is packed into AustinHarris.JsonRpc next to the README. JsmnTokenizer.cs opens with the notice. The README License section, the NuGet README, the reference and the serializer guide name the origin and link the notice. CHANGELOG gets an Unreleased entry.
1 parent 80ef82d commit 35d22f0

8 files changed

Lines changed: 70 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ the package pages on NuGet link here.
88
Versions follow [Semantic Versioning](https://semver.org/) for the public API and the documented wire
99
behaviour: a breaking change to either means a new major version.
1010

11+
## Unreleased
12+
13+
### Fixed
14+
15+
- The built-in serializer's tokenizer is a port of [jsmn](https://github.com/zserge/jsmn) (MIT, copyright Serge A. Zaitsev), whose copyright and permission notice was missing from the tree and the package. `THIRD-PARTY-NOTICES.txt` at the repository root now carries it, ships in the `AustinHarris.JsonRpc` package, and `JsmnTokenizer.cs` opens with the notice; the READMEs and the reference name the origin.
16+
1117
## 2.0.0 (2026-09-28)
1218

1319
### Added

‎Json-Rpc/AustinHarris.JsonRpc.csproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
<ItemGroup>
3838
<None Include="README.md" Pack="true" PackagePath="\" />
39+
<None Include="..\THIRD-PARTY-NOTICES.txt" Pack="true" PackagePath="\" />
3940
<None Include="..\icon.png" Pack="true" PackagePath="\" />
4041
<InternalsVisibleTo Include="AustinHarris.JsonRpcTestN" Key="$(JsonRpcPublicKey)" />
4142
<InternalsVisibleTo Include="AustinHarris.JsonRpc.Micro" Key="$(JsonRpcPublicKey)" />

‎Json-Rpc/Jsmn/JsmnTokenizer.cs‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
// Derived from jsmn (https://github.com/zserge/jsmn), a C JSON tokenizer.
2+
// Copyright (c) 2010 Serge A. Zaitsev
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy
5+
// of this software and associated documentation files (the "Software"), to deal
6+
// in the Software without restriction, including without limitation the rights
7+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
// copies of the Software, and to permit persons to whom the Software is
9+
// furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in
12+
// all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
// THE SOFTWARE.
21+
// The full notice is in THIRD-PARTY-NOTICES.txt at the repository root and in the package.
22+
123
using System;
224
using System.Buffers;
325

‎Json-Rpc/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ You supply the transport.
88
The core has no JSON library dependency.
99
Its built-in serializer works on its own; companion packages add Json.NET,
1010
`System.Text.Json` or ASP.NET Core hosting.
11+
The built-in tokenizer is a port of [jsmn](https://github.com/zserge/jsmn) by Serge A. Zaitsev (MIT); the notice ships in the package as `THIRD-PARTY-NOTICES.txt`.
1112

1213
Targets `netstandard2.0`, `netstandard2.1`, `net8.0` and `net10.0`.
1314
This is a server library, with no client proxies or server-to-client calls.
@@ -192,3 +193,4 @@ Most service methods can stay as they are. Review these changes before switching
192193
- [Upgrading from 1.x](https://astn.github.io/JSON-RPC.NET/upgrading.html)
193194
- [Source repository](https://github.com/Astn/JSON-RPC.NET)
194195
- [MIT license](https://github.com/Astn/JSON-RPC.NET/blob/master/LICENSE)
196+
- [Third-party notices](https://github.com/Astn/JSON-RPC.NET/blob/master/THIRD-PARTY-NOTICES.txt)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,4 +414,4 @@ The tables and charts are generated from [benchmarks/charts/benchmarks.json](ben
414414

415415
## License
416416

417-
MIT. See [LICENSE](LICENSE).
417+
MIT. See [LICENSE](LICENSE). The built-in serializer's tokenizer is a C# port of [jsmn](https://github.com/zserge/jsmn), copyright Serge A. Zaitsev, under the MIT license; its notice is in [THIRD-PARTY-NOTICES.txt](THIRD-PARTY-NOTICES.txt), which also ships in the `AustinHarris.JsonRpc` package.

‎THIRD-PARTY-NOTICES.txt‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Third-party notices for JSON-RPC.NET
2+
3+
JSON-RPC.NET is licensed under the MIT license (see LICENSE). The AustinHarris.JsonRpc
4+
package and the source tree include code derived from the following project, which is
5+
distributed under its own license and copyright notice reproduced below.
6+
7+
------------------------------------------------------------------------------
8+
jsmn
9+
------------------------------------------------------------------------------
10+
11+
Json-Rpc/Jsmn/JsmnTokenizer.cs is a C# port of the jsmn JSON tokenizer by Serge A.
12+
Zaitsev (ported from https://github.com/zserge/jsmn at commit 25647e6, 2021-10-14),
13+
adapted to ReadOnlySpan<byte> with grammar validation added. It is used by the built-in
14+
serializer (AustinHarris.JsonRpc.Jsmn.JsmnSerializer) and ships in every build of the
15+
AustinHarris.JsonRpc assembly.
16+
17+
jsmn (https://github.com/zserge/jsmn)
18+
Copyright (c) 2010 Serge A. Zaitsev
19+
20+
Permission is hereby granted, free of charge, to any person obtaining a copy
21+
of this software and associated documentation files (the "Software"), to deal
22+
in the Software without restriction, including without limitation the rights
23+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24+
copies of the Software, and to permit persons to whom the Software is
25+
furnished to do so, subject to the following conditions:
26+
27+
The above copyright notice and this permission notice shall be included in
28+
all copies or substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
36+
THE SOFTWARE.

‎docs/reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All four packages are MIT licensed and ship together with the same version numbe
88

99
| Package | What it is |
1010
| --- | --- |
11-
| `AustinHarris.JsonRpc` | The server. Envelope parsing, method dispatch, parameter binding, error mapping, sessions. Ships with the built-in serializer, `JsmnSerializer`: a span port of the [jsmn](https://github.com/zserge/jsmn) tokenizer plus a cached reflection mapper, with no JSON library behind it. |
11+
| `AustinHarris.JsonRpc` | The server. Envelope parsing, method dispatch, parameter binding, error mapping, sessions. Ships with the built-in serializer, `JsmnSerializer`: a span port of the [jsmn](https://github.com/zserge/jsmn) tokenizer (MIT, copyright Serge A. Zaitsev; notice in [THIRD-PARTY-NOTICES.txt](https://github.com/Astn/JSON-RPC.NET/blob/master/THIRD-PARTY-NOTICES.txt)) plus a cached reflection mapper, with no JSON library behind it. |
1212
| `AustinHarris.JsonRpc.Newtonsoft` | Json.NET 13 serializer. The compatibility choice: `JsonSerializerSettings`, `[JsonProperty]`, converters, lenient input. |
1313
| `AustinHarris.JsonRpc.SystemTextJson` | System.Text.Json serializer. `JsonSerializerOptions`, `Utf8JsonReader`/`Utf8JsonWriter` straight on the request bytes. |
1414
| `AustinHarris.JsonRpc.AspNetCore` | Kestrel hosting: an HTTP endpoint on `PipeReader`/`BodyWriter`, a `ConnectionHandler` for raw TCP, Unix socket and named pipe connections, and DI registration of services. |

‎docs/serializers.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ the same slot and each ships as its own package.
99

1010
| Package | Serializer | Default? | Notes |
1111
|---|---|---|---|
12-
| `AustinHarris.JsonRpc` | `Jsmn.JsmnSerializer` | yes | no JSON library; span port of the jsmn tokenizer plus a reflection mapper with cached type plans; primitives and `Nullable<T>` bind without boxing |
12+
| `AustinHarris.JsonRpc` | `Jsmn.JsmnSerializer` | yes | no JSON library; span port of the [jsmn](https://github.com/zserge/jsmn) tokenizer (MIT, Serge A. Zaitsev) plus a reflection mapper with cached type plans; primitives and `Nullable<T>` bind without boxing |
1313
| `AustinHarris.JsonRpc.Newtonsoft` | `Newtonsoft.NewtonsoftJsonRpcSerializer` | | Json.NET 13; lenient input; honours `JsonSerializerSettings`; the compatibility choice for code that relied on Json.NET behaviour |
1414
| `AustinHarris.JsonRpc.SystemTextJson` | `SystemTextJson.SystemTextJsonRpcSerializer` | | `Utf8JsonReader`/`Utf8JsonWriter` directly on the request bytes; honours `JsonSerializerOptions` |
1515

0 commit comments

Comments
 (0)