On Thu, Aug 20, 2009 at 2:54 PM, Jason Davies<[email protected]> wrote:
>
> On Aug 20, 7:30 pm, Andy Chu <[email protected]> wrote:
>> Yeah good question.  There are a few inherent limitation in the JSON keys:
>>
>> 1. Dots are interpreted as operators
>> 2. {} can't appear because those are delimiters
>> 3. @ can't because that's the cursor
>> 4. I believe | can't occur either (should specify this better)
>>
>> Writing a custom formatter wouldn't work because the key lookup
>> happens independent of formatting.
>
> I did actually get this working using a custom formatter that does a
> lookup on the cursor (or it can do a lookup on a particular JSON dict
> of course).  For example: {@|rawlookup foo/bar/baz.txt}.  This
> actually works quite nicely as I need to do some additional processing
> on "foo/bar/baz.txt" anyway so I can extend this to fit my needs.  The
> Python implementation was:

OK nice.  I didn't read your example carefully -- I thought you were
talking about a dot on the LHS of | and then a formatter on the RHS.
Using @ of course works fine on the LHS, and the RHS allows almost
anything (except {}, maybe |)

Andy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON 
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to