Jcon.parse
Jcon.parse($text) -> map|list
Description
Parse a JCON string and return the data as a List or Map.
TIPInstead of this method, we recommended you either define JCON as a Jcon template, or parse a file in the
config
directory with Jcon.parseFile()
.
BetaIn future versions, this function will probably return a JconReader object instead of flat data.
$postJcon = File.read('newsUpdates.jcon') $posts = Jcon.parse($postJcon) $posts[1].title //= 'Updated the Logo' //--- file: files/newsUpdates.jcon --- [ { title: Updated the Logo date: July 17, 2019 } { title: New Feed Page date: June 8, 2019 } { title: Server Upgrade date: April 4, 2019 } ]