JSON-LD and Jig?

49 views
Skip to first unread message

Summer White

unread,
Nov 1, 2016, 1:00:17 AM11/1/16
to Fat-Free Framework
Would Jig be suitable to store json with linked data.

I havn't done anything with Jig, or ORM for that matter. I'm a traditional sql guy myself so please feel free to put me in the right direction. Essentially I want to store a directory listing style database utilizing JSON-LD at its base. Jig looked like a good place to start.

- JSON-LD uses the @ symbol. will this conflict with Jigs @?
- Does Jig handle deep associative arrays well?


ikkez

unread,
Nov 1, 2016, 5:31:52 AM11/1/16
to Fat-Free Framework
Jig basically just stores everything in a JSON object, so yes you can put deep associative arrays into the properties too.
I think storing documents that contains properties with @ in its name is no problem. The only thing that is probably not going to work is to filter by that properties, as @ is also othe control char in $mapper->load(array('isset(@foo) && @foo = ?', 'bar')).

Summer White

unread,
Nov 1, 2016, 10:03:20 PM11/1/16
to Fat-Free Framework
It wouldn't hurt if I was to change the control character to something else, such as an ampersand, tilda or percentage symbol?

ikkez

unread,
Nov 2, 2016, 2:52:43 AM11/2/16
to Fat-Free Framework
anything that is not allowed in a php variable name will probably cause throuble
Reply all
Reply to author
Forward
0 new messages