1:- module(
    2  json_ext,
    3  [
    4    json_load/2, % +File, -Structure
    5    json_save/2  % +File, +Structure
    6  ]
    7).    8:- reexport(library(http/json)).

Extended JSON support

*/

   14:- use_module(library(yall)).   15
   16:- use_module(library(file_ext)).
 json_load(+File:atom, -Structure:dict) is det
   24json_load(File, Struct) :-
   25  read_from_file(
   26    File,
   27    {Struct}/[In0]>>json_read_dict(In0, Struct, [value_string_as(atom)])
   28  ).
 json_save(+File:atom, +Structure:dict) is det
   34json_save(File, Struct) :-
   35  write_to_file(File, {Struct}/[Out0]>>json_write_dict(Out0, Struct))