Skip to content

Commit 4b907dd

Browse files
committed
🚚 rename parser class
1 parent d29fb68 commit 4b907dd

File tree

14 files changed

+16
-16
lines changed

14 files changed

+16
-16
lines changed

‎Json5.Tests/Parse/Arrays.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Json5.Tests.Parse;
99
using System.Text.Json.Nodes;
1010

1111
using static FluentAssertions.FluentActions;
12-
using static Json5.Json5Parser;
12+
using static Json5.JSON5;
1313

1414
public class Arrays {
1515
[Fact] void Empty() => Parse("[]").Should().Be(Array.Empty<object>());

‎Json5.Tests/Parse/Bools.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Json5.Tests.Parse;
66

77
using Helpers;
88

9-
using static Json5.Json5Parser;
9+
using static Json5.JSON5;
1010

1111
public class Bools {
1212
[Fact] void True() => Parse("true").Should().Be(true);

‎Json5.Tests/Parse/Comments.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Json5.Tests.Parse;
77
using Helpers;
88

99
using static FluentAssertions.FluentActions;
10-
using static Json5.Json5Parser;
10+
using static Json5.JSON5;
1111

1212
public static class Comments {
1313
public class SingleLine {

‎Json5.Tests/Parse/Floats.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Json5.Tests.Parse;
1010
using System.Text.Json.Serialization;
1111

1212
using static FluentAssertions.FluentActions;
13-
using static Json5.Json5Parser;
13+
using static Json5.JSON5;
1414

1515
public class Floats {
1616
// required to deserialize "Infinity" and "NaN"

‎Json5.Tests/Parse/General.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using System.Text.Json.Serialization;
1010

1111
using static FluentAssertions.FluentActions;
12-
using static Json5.Json5Parser;
12+
using static Json5.JSON5;
1313

1414
public class General {
1515
// required to deserialize "Infinity" and "NaN"

‎Json5.Tests/Parse/Integers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Json5.Tests.Parse;
1010
using System.Text.Json;
1111

1212
using static FluentAssertions.FluentActions;
13-
using static Json5.Json5Parser;
13+
using static Json5.JSON5;
1414

1515
public static class Integers {
1616
// required to deserialize integers beyond Int128.MinValue and UInt128.MaxValue

‎Json5.Tests/Parse/NpmPackageJson.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Json5.Tests.Parse;
88

99
using System.Text.Json.Nodes;
1010

11-
using static Json5.Json5Parser;
11+
using static Json5.JSON5;
1212

1313
public class NpmPackageJson {
1414
[Fact] void Json5MatchesEquivalentJsonReference() => Parse(PackageJson5).Should().Be(JsonNode.Parse(PackageJson));

‎Json5.Tests/Parse/Null.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
using FluentAssertions;
44

5-
using static Json5.Json5Parser;
5+
using static Json5.JSON5;
66

77
public class Null {
88
[Fact] public void Test() => Parse("null").Should().BeNull();

‎Json5.Tests/Parse/Objects.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Json5.Tests.Parse;
99
using System.Text.Json.Nodes;
1010

1111
using static FluentAssertions.FluentActions;
12-
using static Json5.Json5Parser;
12+
using static Json5.JSON5;
1313

1414
public class Objects {
1515
[Fact] void Empty() => Parse("{}").Should().BeEmptyObject();

‎Json5.Tests/Parse/Strings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Json5.Tests.Parse;
77
using Helpers;
88

99
using static FluentAssertions.FluentActions;
10-
using static Json5.Json5Parser;
10+
using static Json5.JSON5;
1111

1212
public class Strings {
1313
[Fact] void DoubleQuoted() => Parse("\"strings are 'fun'\"").Should().Be("strings are 'fun'");

‎Json5.Tests/Parse/Whitespace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Json5.Tests.Parse;
44

55
using Helpers;
66

7-
using static Json5.Json5Parser;
7+
using static Json5.JSON5;
88

99
public class Whitespace {
1010
[Fact] void Leading() => Parse(" \n \t 42").Should().Be(42);

‎Json5/Json5Parser.cs renamed to ‎Json5/JSON5.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// <summary>
1111
/// Provides static methods to translate JSON5 to JSON or parse JSON5 as a <see cref="JsonNode"/>.
1212
/// </summary>
13-
public static class Json5Parser {
13+
public static class JSON5 {
1414
/// <summary>
1515
/// Translates a JSON5 string to JSON and then parses the result as a <see cref="JsonNode"/>.
1616
/// </summary>

‎Json5/Microsoft.Extensions.Configuration/Json5/Json5ConfigFileParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static class Json5ConfigFileParser {
3333
/// <see cref="StringComparer.OrdinalIgnoreCase"/>.
3434
/// </returns>
3535
public static Dictionary<string, string?> Parse(Stream input, string? path = null) {
36-
var json5 = Json5Parser.Parse(input, path);
36+
var json5 = JSON5.Parse(input, path);
3737
return json5?.GetValueKind() == JsonValueKind.Object
3838
? new(json5.AsObject().ToConfigValues(path: ""), StringComparer.OrdinalIgnoreCase)
3939
: throw new FormatException($"Top-level JSON5 element must be an object. Instead, {json5.GetKindString()} was found.");

‎examples/BasicUsage/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
2121
Translated to JSON:
2222
23-
{Json5Parser.Translate(json5)}
23+
{JSON5.Translate(json5)}
2424
2525
Parsed as JsonNode:
2626
27-
{Json5Parser.Parse(json5)}
27+
{JSON5.Parse(json5)}
2828
2929
Deserialized as record:
3030
3131
{
3232
// `JsonSerializerOptions.Web` makes property names case-insensitive and allows
3333
// floating point literals ("NaN", "Infinity").
34-
Json5Parser.Parse(json5).Deserialize<Foo>(JsonSerializerOptions.Web)
34+
JSON5.Parse(json5).Deserialize<Foo>(JsonSerializerOptions.Web)
3535
}
3636
""");
3737

0 commit comments

Comments
 (0)