There's a proposal due to the prolog-commons initiative for a dictionary-like object (that is also implemented in SWI Prolog, I believe).
And in Prolog you can, of course, just trivially use your own term structure for item-values:
p([ item : "value", ... ])
You could even use JSON-like terms in Prolog (with maybe a little help by the op/3 directive to sort out parsing priorities):
A_Prolog_Term = {
x: y,
z: [a, b, {1, d} ]
}
But the more fundamental approach IMHO would be to use nested knowledge-base terms:
p(
q(whatever).
r(X) :- q(X).
).
As pioneered in the 1980s for attribute grammars, using ^^ and other special graph tokens as nested "implies" operator, though (see "definite-clause translation grammars").
Comments
There's a proposal due to the prolog-commons initiative for a dictionary-like object (that is also implemented in SWI Prolog, I believe).
And in Prolog you can, of course, just trivially use your own term structure for item-values:
You could even use JSON-like terms in Prolog (with maybe a little help by the op/3 directive to sort out parsing priorities): But the more fundamental approach IMHO would be to use nested knowledge-base terms: As pioneered in the 1980s for attribute grammars, using ^^ and other special graph tokens as nested "implies" operator, though (see "definite-clause translation grammars").