On Thu, Sep 8, 2011 at 10:27 PM, Stephan Beal <sgb...@googlemail.com> wrote:
> i recommend JSON mainly for portability. It can be generated (with some > limitations) even from shell scripts and posted via wget or curl. > Form-encoding is more expensive and (with JSON) unnecessary. That said, i > have code in place (in another tree, but it could be ported) for translating > form-encoded data into a JSON object so that the application can treat both > forms identically. i.e. with that in place form encoding can ... > It just occurred to me (and got me out of bed)... form-decoding is not _quite_ the same. If we have a form with: a=1 b=2 and convert it to JSON: { "a": "1", "b":"2" } note that the values are strings (because we won't have enough type information in the parsing code and don't want to scan every token to determine its type). When we get JSON as input, the type information is there and is retained throughout the app. -- ----- stephan beal http://wanderinghorse.net/home/stephan/
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users