Skip to content

Commit 9040371

Browse files
authored
Update json-ng to 0.3.0 (#68)
json-ng 0.3.0 replaces JsonNull with None. This also pulls in the 0.2.0 renames (JsonType → JsonValue, NotFound → JsonNotFound). Switch CI to nightly ponyc image since json-ng 0.3.0 depends on a persistent HashMap fix (ponyc #4833) not yet in a release.
1 parent dc12c53 commit 9040371

10 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/breakage-against-ponyc-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Verify main against the latest ponyc
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/ponylang/shared-docker-ci-x86-64-unknown-linux-builder-with-openssl_3.3.2:latest
15+
image: ghcr.io/ponylang/shared-docker-ci-standard-builder-with-openssl-3.6.0:nightly
1616
steps:
1717
- uses: actions/checkout@v4.1.1
1818
- name: Test

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
name: Test against recent ponyc release on Linux
4040
runs-on: ubuntu-latest
4141
container:
42-
image: ghcr.io/ponylang/shared-docker-ci-x86-64-unknown-linux-builder-with-openssl_3.3.2:release
42+
image: ghcr.io/ponylang/shared-docker-ci-standard-builder-with-openssl-3.6.0:nightly
4343
steps:
4444
- uses: actions/checkout@v4.1.1
4545
- name: Test

corral.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"locator": "github.com/ponylang/json-ng.git",
17-
"version": "0.1.0"
17+
"version": "0.3.0"
1818
},
1919
{
2020
"locator": "github.com/ponylang/uri.git",

github_rest_api/issue.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ primitive IssueJsonConverter is req.JsonConverter[Issue]
163163

164164
let pr_json = json("pull_request")
165165
let pull_request = match pr_json.json()
166-
| let _: JsonType =>
166+
| let _: JsonValue =>
167167
IssuePullRequestJsonConverter(pr_json, creds)?
168168
else
169169
None

github_rest_api/json_nav_util.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ primitive JsonNavUtil
1313
fun string_or_none(json: JsonNav): (String | None) ? =>
1414
match json.json()
1515
| let s: String => s
16-
| JsonNull => None
16+
| None => None
1717
else error
1818
end

github_rest_api/paginated_list.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class PaginatedJsonRequesterHandler[A: Any val] is HTTPHandler
216216

217217
if _status == 200 then
218218
match JsonParser.parse(consume y)
219-
| let json: JsonType => _receiver.success(JsonNav(json), _link_header)
219+
| let json: JsonValue => _receiver.success(JsonNav(json), _link_header)
220220
| let _: JsonParseError => _receiver.failure(_status, "",
221221
"Failed to parse response")
222222
end

github_rest_api/request/http_get.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class JsonRequesterHandler is HTTPHandler
9797

9898
if _status == 200 then
9999
match JsonParser.parse(consume y)
100-
| let json: JsonType => _receiver.success(JsonNav(json))
100+
| let json: JsonValue => _receiver.success(JsonNav(json))
101101
| let _: JsonParseError => _receiver.failure(_status, "",
102102
"Failed to parse response")
103103
end

github_rest_api/request/http_post.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class HTTPPostHandler is HTTPHandler
8383

8484
if _status == 201 then
8585
match JsonParser.parse(consume y)
86-
| let json: JsonType => _receiver.success(JsonNav(json))
86+
| let json: JsonValue => _receiver.success(JsonNav(json))
8787
| let _: JsonParseError => _receiver.failure(_status, "",
8888
"Failed to parse response")
8989
end

github_rest_api/request/json.pony

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ primitive JsonTypeString
1414
| let i: I64 => i.string()
1515
| let f: F64 => f.string()
1616
| let b: Bool => b.string()
17-
| JsonNull => "null"
18-
| NotFound => "NotFound"
17+
| None => "null"
18+
| JsonNotFound => "JsonNotFound"
1919
end

github_rest_api/search.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class SearchJsonRequesterHandler[A: Any val] is HTTPHandler
238238

239239
if _status == 200 then
240240
match JsonParser.parse(consume y)
241-
| let json: JsonType => _receiver.success(JsonNav(json), _link_header)
241+
| let json: JsonValue => _receiver.success(JsonNav(json), _link_header)
242242
| let _: JsonParseError => _receiver.failure(_status, "",
243243
"Failed to parse response")
244244
end

0 commit comments

Comments
 (0)