Skip to content

JSONassert introduces split package issues in any Java 9+ project using it #116

Open

Description

@ntherrien

java.lang.module.ResolutionException: Modules android.json and jsonassert export package org.json to module tomcat.embed.core

Because JSONAssert has a dependency on jsonassert, and because it defines JSONString in the org.json package (same that android.json uses), using JSONAssert will always cause split package issues in any Java 9++ programs that use it.

Simple solution is to change the JSONString package name as it cannot belong to org.json.

Another solution is to move JSONString to the android.json project.

Another solution is to avoid defining or using JSONString altogether.

I have not found any workaround to this other than excluding JSONAssert from the dependencies. Any help getting our existing code to work on Java11 with JSONAssert would be appreciated.

Activity

  1. ntherrien commented on Apr 19, 2019

    @ntherrien
    Author

    Would you guys be open to an update of this project to support Java 11? I can volunteer some time to perform the modularization.

    Does your build server support Java 11 builds?

  2. haster commented on May 15, 2019

    @haster

    I am running into the same issue. Right now, JSONAssert is not usable in a jigsaw context due to this split-package issue.

  3. zrbrown commented on Nov 11, 2022

    @zrbrown

    I submitted a PR for this. There are some other things that would be nice in a potential new major version, like bumping the source/target version (6 doesn't even work with Maven anymore), and even adding a module-info file. I'd be happy to help with these as well!

  4. scordio commented on Feb 19, 2025

    @scordio

    This should have been addressed by #194.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions