[Chapel Merge] Fix JSON output for list and map

Branch: refs/heads/main
Revision: b015da9
Author: mppf
Log Message:

Merge pull request #18167 from mppf/fix-18156

Fix JSON output for list and map

Fixes #18156

This PR:

  • fixes a problem where I/O errors from openmem files didn't report an
  • fixes some errors with JSON output for list and map by using ioLiteral
  • adds a prototype readThis to list to support json input

Please note that reading JSON for list and map is not yet complete.

Reviewed by @dlongnecke-cray - thanks!

  • [x] full local testing

    Modified Files:
    A test/io/ferguson/issue-18156.chpl
    A test/io/ferguson/issue-18156.good
    A test/io/ferguson/json-linked-list.chpl
    A test/io/ferguson/json-linked-list.good
    A test/io/ferguson/json-linked-list2.chpl
    A test/io/ferguson/json-linked-list2.good
    A test/io/ferguson/list-binary.chpl
    A test/io/ferguson/list-binary.good
    A test/io/ferguson/memfile-format-error-offset.chpl
    A test/io/ferguson/memfile-format-error-offset.good
    M modules/standard/IO.chpl
    M modules/standard/List.chpl
    M modules/standard/Map.chpl
    M test/io/ferguson/issue-16945-error-read-nil-non-nilable.good
    M test/io/ferguson/json-list.chpl
    M test/io/ferguson/json-list.good
    M test/io/ferguson/json-list2.chpl
    M test/io/ferguson/json-list2.good
    M test/regex/bytes/nonUTFIO.good

    Compare: Comparing fb44a6454f25...b015da979003 · chapel-lang/chapel · GitHub