FS#74396 - [octave] 7.1.0-1 does not enable new built-in json functions

Attached to Project: Community Packages
Opened by Nicolas Steven Miller (zrnsm) - Friday, 08 April 2022, 03:05 GMT
Last edited by Antonio Rojas (arojas) - Friday, 08 April 2022, 06:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Octave 7.1 ships with native `jsonencode` and `jsondecode` functions. These were formerly part of a third-party package `pkg-json` (https://github.com/gnu-octave/pkg-json). The underlying implementation relies on RapidJSON.


Additional info:
* octave, 7.1.0-1

Steps to reproduce:
1. Run `octave` from a terminal.
2. Execute the built-in function `jsonencode` or `jsondecode`.

Expected result: either function has the same functionality enabled previously by installing pkg-json.

Observed result:
```
octave:1> jsonencode
error: jsonencode: support for JSON encoding through RapidJSON was unavailable or disabled when Octave was built
octave:2> jsondecode
error: jsondecode: support for JSON decoding through RapidJSON was unavailable or disabled when Octave was built
```
This task depends upon

Closed by  Antonio Rojas (arojas)
Friday, 08 April 2022, 06:54 GMT
Reason for closing:  Implemented
Additional comments about closing:  octave 7.1.0-2
Comment by Antonio Rojas (arojas) - Friday, 08 April 2022, 06:54 GMT
Enabled in 7.1.0-2, but note that some features are not available with our rapidjson version:

configure: WARNING: RapidJSON library found, but some features do not seem to work properly. The "PrettyWriter" option in jsonencode will be disabled.

This might be due to requiring a newer rapidjson (last release was over 5 years ago) or an actual bug in the octave implementation. Please follow up with upstream in case you need such feature.

Loading...