Skip to content

Support JSON::Parse without XS #1148

Description

@fglock

Summary

JSON::Parse 0.62 cannot load on PerlOnJava because the distribution requires
its XS implementation and no Java replacement is registered:

Can't load loadable object for module JSON::Parse: no Java XS implementation available

The distribution includes Parse.xs and supporting C sources. The generated
Perl files alone are insufficient to provide the parser.

Reproduction and control result

CPAN run 20260826-133506-83222 tested HTML::Make::Page 0.04. It depends on
HTML::Make 0.17, which depends on JSON::Parse 0.62. Both PerlOnJava
backends fail when loading JSON::Parse; the downstream files
t/html-make-page.t and t/options.t cannot start their test plans.

As a control, the exact HTML::Make, HTML::Valid, and JSON::Parse
prerequisites were installed into an isolated system-Perl library. The
unmodified HTML::Make::Page 0.04 suite then passed completely: 2 files and
18 tests.

HTML::Valid is also an XS distribution, but JSON::Parse fails first and is
the immediate blocker for this dependency chain.

Ecosystem impact

CPAN metadata reports 36 reverse dependants for JSON::Parse, including 7
recent dependants. Examples include HTML::Make, HTML::Valid,
Google::Ads::GoogleAds::Client, JSON::Create, and Config::Abstraction.

Proposed investigation

First determine whether a compatible pure-Perl implementation can cover the
public JSON::Parse API and error behavior needed by common callers. If that
is not viable, implement the required parser/tokenizer functionality in Java
and expose it through the module's expected Perl API.

Acceptance criteria

  • use JSON::Parse works without a native library on both PerlOnJava backends.
  • Add project-owned regression coverage for the implemented public behavior.
  • HTML::Make::Page 0.04 passes t/html-make-page.t and t/options.t on
    both backends with its normal CPAN dependency overlay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions