• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 5260
91%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2026 04:26AM UTC
Jobs 1
Files 389
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jul 2026 04:25AM UTC coverage: 91.293%. Remained the same
5260

push

github

web-flow
feat(json): add free `to_json` function (#3850)

Add a free `@json.to_json(value)` function, symmetric with `@json.from_json`,
delegating to the `ToJson` trait method. This gives a first-class free-function
form for converting any `ToJson` value to `Json`, so callers can prefer it over
the implicitly-promoted `value.to_json()` method.

Prerequisite for the `implicit_impl_as_method` (E0079) migration: once this
lands, the per-package PRs (first one #3849) can deprecate the promoted `to_json`
method in favour of `@json.to_json`.

The doc example is a checked (`mbt check`) doctest and uses `@debug.debug_inspect`
rather than `inspect`, since `Json`'s `Show` impl is deprecated in favour of
`Debug`.

Verified: `moon check --deny-warn --target all` clean; `moon test -p
moonbitlang/core/json --target all` green (185 tests x 4 backends).

Reviewed by Codex CLI: signature mirrors from_json, trait delegation is correct,
the checked doctest is well-formed and exercises @json.to_json, @debug.debug_inspect
correctly avoids the deprecated Json Show (Debug repr matches), and the change is
scoped to json/ with no deprecation added.

Signed-off-by: Codex CLI <codex@openai.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

1 of 1 new or added line in 1 file covered. (100.0%)

15885 of 17400 relevant lines covered (91.29%)

189078.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5260.1 22 Jul 2026 04:26AM UTC 390
91.31
GitHub Action Run
Source Files on build 5260
  • Tree
  • List 389
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d926de91 on github
  • Prev Build on main (#5253)
  • Next Build on main (#5263)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc