Guys,
I recently wrote some Clojure to take a JSON Schema and corresponding JSON document and produce a JSON document in another JSON "dialect".
Then I realised that I needed to write the reverse transformation.
I've been wondering how I might capture the relationship between the two JSON dialects in such a way as to be able to travel backwards and forwards between them using the same code,
A long time ago I wrote a lot of PROLOG, so I thought I would have a look at core.logic.
I managed some limited success using 'featurep' to inspect schema nodes for e.g. {"type" "string"} and then {"type" "string" "format" "date-time"} but now my date-times are also matching my string code :-( - I tried using {"type" "string" "format' nil} to match non-date-time strings but no joy - I really need something like 'non-featurec'...
core.logic seems to be very quiet. Should I press on - in which case I'd be interested to hear of any solutions that folks have come up with for implementing mutually exclusive sets of 'features' - or should I look for another solution - in which case can anyone suggest anything ?
I find the idea of using core.logic to do bi-directional JSON doc transformations really appealing - what do others think ?
Jules