From ef78414d58f1c8c2ede30fc8c3efe6e85263d98f Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 6 Oct 2025 12:50:59 +1300 Subject: [PATCH 1/2] Add support for JSON@1 --- Project.toml | 2 +- test/Project.toml | 2 +- test/runtests.jl | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 88aad14..63b7b46 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,7 @@ JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" JSONSchemaJSON3Ext = "JSON3" [compat] -JSON = "0.21" +JSON = "0.21, 1" JSON3 = "1" URIs = "1" julia = "1.9" diff --git a/test/Project.toml b/test/Project.toml index 4d06c99..e87aca0 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -9,7 +9,7 @@ ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" [compat] HTTP = "1" -JSON = "0.21" +JSON = "1" JSON3 = "1" OrderedCollections = "1" ZipFile = "0.8, 0.9, 0.10" diff --git a/test/runtests.jl b/test/runtests.jl index 0e623b9..68f2e62 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -224,7 +224,7 @@ end \"required\": [\"foo\"] }""") @test typeof(schema) == Schema - @test typeof(schema.data) == Dict{String,Any} + @test typeof(schema.data) <: AbstractDict{String,Any} schema_2 = JSONSchema.Schema(false) @test typeof(schema_2) == Schema @test typeof(schema_2.data) == Bool @@ -237,14 +237,13 @@ end @testset "errors" begin @test_throws( - ErrorException("missing property 'Foo' in $(Dict{String,Any}())."), + ErrorException("missing property 'Foo' in $(JSON.parse("{}"))."), JSONSchema.Schema("""{ "type": "object", "properties": {"version": {"\$ref": "#/definitions/Foo"}}, "definitions": {} - }""") + }"""), ) - @test_throws( ErrorException("unmanaged type in ref resolution $(Int64): 1."), JSONSchema.Schema("""{ From ee68830d1f912b697ee272d08aaf4ecc29c1721a Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 6 Oct 2025 13:25:37 +1300 Subject: [PATCH 2/2] Disable 32-bit Linux testing in CI workflow Comment out the inclusion of 32-bit Linux testing in CI. --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97d008a..2f7d46b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,12 @@ jobs: version: ['1.10', '1'] # Test against LTS and current minor release os: [ubuntu-latest, macOS-latest, windows-latest] arch: [x64] - include: + # Upstream bug: https://github.com/JuliaIO/JSON.jl/issues/386 + # include: # Also test against 32-bit Linux on LTS. - - version: '1.10' - os: ubuntu-latest - arch: x86 + # - version: '1.10' + # os: ubuntu-latest + # arch: x86 steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2