Re: [fossil-users] authentication in JSON: anonymous vs. guest user

2011-09-13 Thread Alaric Snell-Pym
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/12/2011 05:07 PM, Stephan Beal wrote:
 On Mon, Sep 12, 2011 at 5:50 PM, Richard Hipp d...@sqlite.org wrote:

 Anchor tags in HTML are just one mechanism for providing hyperlinks.  In
 JSON, you could just as easily invent an alternative mechanism.  Perhaps an
 object:

 {
 LinkType: Next,
 URI: http://www.fossil-scm.org/fossil/json/timeline?first=12345
 
 }


 That looks good.

 @Anyone who's got ideas for how to best represent stuff like that, feel free
 to chime in. This doesn't just apply to the timeline, but potentially to any
 page which presents detail links (as opposed to the nav links in the page
 header and whatnot).

I'm not sure if LinkType is necessary as it'll presumably be implied
by context, but it might be worth including JSON and human-HTML versions
of each URL, like so:

{
   ...stufff about a commit...
   parents : {
  hash of parent commit : { json : http://..json;, html
: http://...html; },
  hash of parent commit : { json : http://..json;, html
: http://...html; }
   }
}



- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5vFKQACgkQRgz/WHNxCGpczQCeMQa3JMjYxB67BefHXfVPfDUB
dGEAnRBKSR1RX8imx0DpgJNeaDX7TXag
=D42+
-END PGP SIGNATURE-
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] authentication in JSON: anonymous vs. guest user

2011-09-13 Thread Ron Wilson
On Tue, Sep 13, 2011 at 4:30 AM, Alaric Snell-Pym
ala...@snell-pym.org.uk wrote:
 by context, but it might be worth including JSON and human-HTML versions
 of each URL, like so:

 {
   ...stufff about a commit...
   parents : {
      hash of parent commit : { json : http://..json;, html
 : http://...html; },
      hash of parent commit : { json : http://..json;, html
 : http://...html; }
   }
 }

If the difference between a JSON and an HTML URL is just the .json (or
.../json/...), then a single URL should be sufficient.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] authentication in JSON: anonymous vs. guest user

2011-09-13 Thread Ron Wilson
On Mon, Sep 12, 2011 at 6:44 PM, Stephan Beal sgb...@googlemail.com wrote:
 On Tue, Sep 13, 2011 at 12:35 AM, Ron Wilson ronw.m...@gmail.com wrote:

 I would add LinkDescription:description to that, or possibly
 LinkDescription:URL, but usually the description would be short

 That actually touches on my original point - if we have Ticket JSON objects,
 we don't much need to transmit ticket links because the links can be
 generated from the objects (if needed). A client also gains little (i
 suspect) from having the JSON API send links to non-JSON pages (which he

The links would be for fetching things not yet retreived, though I
will grant it could be possible to construct the link from other
information already retreived.

Also, I was not suggesting sending links to non-JSON pages, only that
a short description might be supplied for the use in displaying an UI.

 One problematic area in that regard, however, is wiki content. It is, by
 nature, HTML. i would like to include an option to return raw or parsed wiki
 pages (provided that isn't a potential security issue), but it wouldn't be
 practical to parse the wiki page as a DOM-like JSON structure, so we would
 deliver it like fossil does now (with the option to return it in
 raw/unparsed form).

Raw delivery of wiki pages is an issue of its own. I have not yet
looked into that, as I have been able to make do with surounding the
wiki content with nowiki ... /nowiki (which I mentioned in a post
some while back).
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] authentication in JSON: anonymous vs. guest user

2011-09-13 Thread Stephan Beal
On Tue, Sep 13, 2011 at 5:35 PM, Ron Wilson ronw.m...@gmail.com wrote:

 Raw delivery of wiki pages is an issue of its own. I have not yet
 looked into that, as I have been able to make do with surounding the
 wiki content with nowiki ... /nowiki (which I mentioned in a post
 some while back).


i've had similar frustrations with not being able to get raw wiki pages, and
i'd like the json API to be able to return unparsed pages. This could be
used, e.g., to store the pages using arbitrary wiki formats, provided the
client has a rendering/parser for the format.

-- 
- 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


Re: [fossil-users] authentication in JSON: anonymous vs. guest user

2011-09-13 Thread Alaric Snell-Pym
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/13/2011 04:24 PM, Ron Wilson wrote:
 On Tue, Sep 13, 2011 at 4:30 AM, Alaric Snell-Pym
 ala...@snell-pym.org.uk wrote:
 by context, but it might be worth including JSON and human-HTML versions
 of each URL, like so:

 {
   ...stufff about a commit...
   parents : {
  hash of parent commit : { json : http://..json;, html
 : http://...html; },
  hash of parent commit : { json : http://..json;, html
 : http://...html; }
   }
 }

 If the difference between a JSON and an HTML URL is just the .json (or
 .../json/...), then a single URL should be sufficient.

That depends if you want to promise forever more that said difference
will hold, and expect clients to do their own regexping to exploit said
promise :-)

ABS


- --
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk5vyBwACgkQRgz/WHNxCGoBswCgj82M+ZNDR1ZHz2u1vbl5/erR
a9kAl34BkFjg+XaTbczOoOV/UZRk8rI=
=05r8
-END PGP SIGNATURE-
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users