path>json ( path -- json ) - Factor Documentation

path>json ( path -- json )
JSON serialization



Vocabulary
json

Inputs
path a pathname string


Outputs
json a JSON object


Word description
Reads a file into a single JSON object. Throws an error if the file contains more than one json.

See also
path>jsons , json>path , jsons>path

Definition
USING: io.encodings.utf8 io.files json.private ;

IN: json

: path>json ( path -- json )
utf8 [ read-jsons get-json ] with-file-reader ;

AltStyle によって変換されたページ (->オリジナル) /