Skip to content

Commit 3e01774

Browse files
authored
Add support for JSON@1 (#67)
1 parent b65c207 commit 3e01774

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ jobs:
1818
version: ['1.10', '1'] # Test against LTS and current minor release
1919
os: [ubuntu-latest, macOS-latest, windows-latest]
2020
arch: [x64]
21-
include:
21+
# Upstream bug: https://github.com/JuliaIO/JSON.jl/issues/386
22+
# include:
2223
# Also test against 32-bit Linux on LTS.
23-
- version: '1.10'
24-
os: ubuntu-latest
25-
arch: x86
24+
# - version: '1.10'
25+
# os: ubuntu-latest
26+
# arch: x86
2627
steps:
2728
- uses: actions/checkout@v4
2829
- uses: julia-actions/setup-julia@v2

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
1414
JSONSchemaJSON3Ext = "JSON3"
1515

1616
[compat]
17-
JSON = "0.21"
17+
JSON = "0.21, 1"
1818
JSON3 = "1"
1919
URIs = "1"
2020
julia = "1.9"

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
99

1010
[compat]
1111
HTTP = "1"
12-
JSON = "0.21"
12+
JSON = "1"
1313
JSON3 = "1"
1414
OrderedCollections = "1"
1515
ZipFile = "0.8, 0.9, 0.10"

test/runtests.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ end
224224
\"required\": [\"foo\"]
225225
}""")
226226
@test typeof(schema) == Schema
227-
@test typeof(schema.data) == Dict{String,Any}
227+
@test typeof(schema.data) <: AbstractDict{String,Any}
228228
schema_2 = JSONSchema.Schema(false)
229229
@test typeof(schema_2) == Schema
230230
@test typeof(schema_2.data) == Bool
@@ -237,14 +237,13 @@ end
237237

238238
@testset "errors" begin
239239
@test_throws(
240-
ErrorException("missing property 'Foo' in $(Dict{String,Any}())."),
240+
ErrorException("missing property 'Foo' in $(JSON.parse("{}"))."),
241241
JSONSchema.Schema("""{
242242
"type": "object",
243243
"properties": {"version": {"\$ref": "#/definitions/Foo"}},
244244
"definitions": {}
245-
}""")
245+
}"""),
246246
)
247-
248247
@test_throws(
249248
ErrorException("unmanaged type in ref resolution $(Int64): 1."),
250249
JSONSchema.Schema("""{

0 commit comments

Comments
 (0)