Skip to content

Conversation

@mmatera
Copy link
Contributor

@mmatera mmatera commented Dec 30, 2025

This improves the support for reading JSON files needed in #1582.

context = "JSON`Import`"
messages = {"dec": "Decoding Error at `1`"}

def eval(self, filename, evaluation: Evaluation):
Copy link
Member

@rocky rocky Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and the other eval routines) should be moved under mathics.eval

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually I will do that, but this is just to help #1582

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. You are on the honor system to make good on this. I am concerned that a number of the things that get put off don't get done.

LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In concrete, the former implementation of the JSON imported does not work. I want to be able to import JSON to share lists of tests between WMA and the pytest system of Mathics, to narrow the differences in formatting, and maybe later, on other aspects.
In particular, the JSON implementation I wrote is quite small. A refactor of the importers would requiere to review the code of the HTML and XML importers, which are much more complex. In order to finish something, I need to focus on one problem...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. You are on the honor system to make good on this. I am concerned that a number of the things that get put off don't get done.

TODO/FIXME comments, Issues, Kanban boards, PMs, stand-ups, all-hands, ..., tell me when you want me to stop ...

@rocky rocky changed the title use json libraty to Import json files use JSON library to Import JSON files Dec 30, 2025
@rocky rocky changed the title use JSON library to Import JSON files use JSON library to import JSON files Dec 30, 2025
@mmatera mmatera merged commit 283be9a into master Dec 30, 2025
21 checks passed
@mmatera mmatera deleted the JSON branch December 30, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants