On Thu, Sep 11, 2014 at 10:02 PM, Ron W <[email protected]> wrote:

> No different than my TH1 code being my responsibility to make sure it
> handles my custom fields correctly.
>

"handles" is the operative word. TH1 can _handle_ things, and JSON, by
itself, cannot.


> The only expectations of the JSON API would be to limit the length of
> strings delivered to the rest of Fossil and map queries/updates
> appropriately (see below).
>

Any such limits cannot be imposed until the JSON is parsed in its entirety,
though. The JSON "DOM" (so to say) gets parsed at a lower level, and then
the Fossil side of that has to understand what those limits are and where
to apply them. e.g. it must not apply them in the Wiki APIs, where pages
can be arbitrarily long.


>
>> What, like this?
>>
>> [odroid@host:~/fossil/cwal]$ f json query -sql 'select count(*) from
>> user'
>> {
>>
> Is this possible through the web interface? If so, can it be disabled?
>

It's enabled for admin/setup users only (which also means any CLI use,
since Fossil treats CLI users as a superuser), and there is no mechanism
for disabling individual calls.



> It just means that any app (or other library) using libfossil to access
> tickets will have to be held responsible for using the custom fields
> correctly. libfossil would only provide the means to access the tickets and
> their fields. No validation beyond limiting string lengths. Nor any mapping
> of queries or updates.
>

Why are string length limits so important here - i don't get that part.
What if someone wants to add a "rough draft of your most recent novel"
field?

(From above) By appropriate mapping, I suggest something like:
>
> Query JSON message: Payload is 2 lists: One of name/value pairs
> designating the fields to search and describing the values to match. The
> other a list of fields to return in the results.
>
> Update/Add JSON message: Payload is a list of name value pairs designating
> the fields and their values.
>
> The response could be either just a string containing the "raw" response,
> or a list of name/value pairs.
>


i'll need to see an example before that's clear to me, i think. Can you
compose some pseudo-json for such a request/response exchange?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to