<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Contact</title>
	<atom:link href="http://bluelinecity.com/software/pis/contact/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluelinecity.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 22 Sep 2011 02:40:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://bluelinecity.com/software/pis/contact/#comment-45959</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 22 Sep 2011 02:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://bluelinecity.com/?page_id=152#comment-45959</guid>
		<description>Hi Paul, Thanks for reporting this bug. I found a greedy regular expression that was taking up too much of the quoted strings. I just uploaded a bug fixed version of jpath ( 1.0.5 ) that solves this issue.</description>
		<content:encoded><![CDATA[<p>Hi Paul, Thanks for reporting this bug. I found a greedy regular expression that was taking up too much of the quoted strings. I just uploaded a bug fixed version of jpath ( 1.0.5 ) that solves this issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Swennenhuis</title>
		<link>http://bluelinecity.com/software/pis/contact/#comment-45930</link>
		<dc:creator>Paul Swennenhuis</dc:creator>
		<pubDate>Wed, 21 Sep 2011 20:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://bluelinecity.com/?page_id=152#comment-45930</guid>
		<description>Hi Bryan,

I spent all day looking for a powerful yet easy-to-use XPath-like JSON query language.
Yours evaluated as top entry (so congrats!).
However, during testing I discovered JPath has problems with nested properties.
I extended your demo &#039;library&#039; JSON dataset by making objects of the chapters of a book (see below) and then tried to query it like this:

var somevalue = jpath.query(&#039;books[title == &quot;Brief History of time&quot;][0]/chapters[name == &quot;Chapter 1&quot;][0]/contents&#039;);   

However that results in null. But when I split the query in two, using the result of the first part to create a new JPath object and use that to query the second part, it works fine:

var somevalue = new JPath(jpath.query(&#039;books[title == &quot;Brief History of time&quot;][0]&#039;)).query(&#039;/chapters[name == &quot;Chapter 1&quot;][0]/contents&#039;);  // results in &#039;A lot of paragraphs&#039; which is what I expected.

Can you shed your light on this?

Also, the &#039;and&#039; and &#039;or&#039; operators do not seem to work correctly: when I enter this query:

var somevalue = jpath.query(&#039;books[title == &quot;Brief History of time&quot; and isbn == &quot;1234-ABCD&quot;][0]&#039;); 

it results in null again.

Here are the data I used:


var library = {
   &#039;name&#039; :&#039;My Library&#039;,
   &#039;@open&#039; : &#039;2007-17-7&#039;,
   &#039;address&#039; : {
	&#039;city&#039; : &#039;Springfield&#039;,
	&#039;zip&#039; : &#039;12345&#039;,
	&#039;state&#039; : &#039;MI&#039;,
	&#039;street&#039; : &#039;Mockingbird Lane&#039;
   },
   &#039;books&#039;:[
	{
	&#039;title&#039; : &#039;Harry Potter&#039;,
	&#039;isbn&#039;  : &#039;1234-1234&#039;,
	&#039;category&#039; : &#039;Childrens&#039;,
	&#039;available&#039; : &#039;3&#039;,
	&#039;chapters&#039; : [ &#039;Chapter 1&#039;, &#039;Chapter 2&#039; ]
	},
	{
	&#039;title&#039; : &#039;Brief History of time&#039;,
	&#039;isbn&#039;  : &#039;1234-ABCD&#039;,
	&#039;category&#039; : &#039;Science&#039;,
	&#039;chapters&#039; : [ 
	   {&#039;name&#039;: &#039;Chapter 1&#039;,
	    &#039;contents&#039;: &#039;A lot of paragraphs&#039;
	   },
	   {&#039;name&#039;: &#039;Chapter 2&#039;,
	    &#039;contents&#039;: &#039;Also a lot of paragrahps&#039;
	   }
	  ]
	},
	{
	&#039;title&#039; : &#039;Lord of the Rings&#039;,
	&#039;isbn&#039;  : &#039;1234-PPPP&#039;,
	&#039;category&#039; : &#039;Fiction&#039;,
	&#039;chapters&#039; : [ &#039;Section 1&#039;, &#039;Section 2&#039; ]
        }
   ],
   &#039;categories&#039; : [
        {&#039;name&#039;:&#039;Childrens&#039;, &#039;description&#039;:&#039;Childrens books&#039;},
        {&#039;name&#039;:&#039;Science&#039;, &#039;description&#039;:&#039;Books about science&#039;},
        {&#039;name&#039;:&#039;Fiction&#039;, &#039;description&#039;:&#039;Fiction books&#039;}
   ]}; 


Thanks in advance, 

Paul</description>
		<content:encoded><![CDATA[<p>Hi Bryan,</p>
<p>I spent all day looking for a powerful yet easy-to-use XPath-like JSON query language.<br />
Yours evaluated as top entry (so congrats!).<br />
However, during testing I discovered JPath has problems with nested properties.<br />
I extended your demo &#8216;library&#8217; JSON dataset by making objects of the chapters of a book (see below) and then tried to query it like this:</p>
<p>var somevalue = jpath.query(&#8216;books[title == "Brief History of time"][0]/chapters[name == "Chapter 1"][0]/contents&#8217;);   </p>
<p>However that results in null. But when I split the query in two, using the result of the first part to create a new JPath object and use that to query the second part, it works fine:</p>
<p>var somevalue = new JPath(jpath.query(&#8216;books[title == "Brief History of time"][0]&#8216;)).query(&#8216;/chapters[name == "Chapter 1"][0]/contents&#8217;);  // results in &#8216;A lot of paragraphs&#8217; which is what I expected.</p>
<p>Can you shed your light on this?</p>
<p>Also, the &#8216;and&#8217; and &#8216;or&#8217; operators do not seem to work correctly: when I enter this query:</p>
<p>var somevalue = jpath.query(&#8216;books[title == "Brief History of time" and isbn == "1234-ABCD"][0]&#8216;); </p>
<p>it results in null again.</p>
<p>Here are the data I used:</p>
<p>var library = {<br />
   &#8216;name&#8217; :&#8217;My Library&#8217;,<br />
   &#8216;@open&#8217; : &#8217;2007-17-7&#8242;,<br />
   &#8216;address&#8217; : {<br />
	&#8216;city&#8217; : &#8216;Springfield&#8217;,<br />
	&#8216;zip&#8217; : &#8217;12345&#8242;,<br />
	&#8216;state&#8217; : &#8216;MI&#8217;,<br />
	&#8216;street&#8217; : &#8216;Mockingbird Lane&#8217;<br />
   },<br />
   &#8216;books&#8217;:[<br />
	{<br />
	'title' : 'Harry Potter',<br />
	'isbn'  : '1234-1234',<br />
	'category' : 'Childrens',<br />
	'available' : '3',<br />
	'chapters' : [ 'Chapter 1', 'Chapter 2' ]<br />
	},<br />
	{<br />
	&#8216;title&#8217; : &#8216;Brief History of time&#8217;,<br />
	&#8216;isbn&#8217;  : &#8217;1234-ABCD&#8217;,<br />
	&#8216;category&#8217; : &#8216;Science&#8217;,<br />
	&#8216;chapters&#8217; : [<br />
	   {'name': 'Chapter 1',<br />
	    'contents': 'A lot of paragraphs'<br />
	   },<br />
	   {'name': 'Chapter 2',<br />
	    'contents': 'Also a lot of paragrahps'<br />
	   }<br />
	  ]<br />
	},<br />
	{<br />
	&#8216;title&#8217; : &#8216;Lord of the Rings&#8217;,<br />
	&#8216;isbn&#8217;  : &#8217;1234-PPPP&#8217;,<br />
	&#8216;category&#8217; : &#8216;Fiction&#8217;,<br />
	&#8216;chapters&#8217; : [ 'Section 1', 'Section 2' ]<br />
        }<br />
   ],<br />
   &#8216;categories&#8217; : [<br />
        {'name':'Childrens', 'description':'Childrens books'},<br />
        {'name':'Science', 'description':'Books about science'},<br />
        {'name':'Fiction', 'description':'Fiction books'}<br />
   ]}; </p>
<p>Thanks in advance, </p>
<p>Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://bluelinecity.com/software/pis/contact/#comment-3039</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Thu, 28 Jan 2010 04:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://bluelinecity.com/?page_id=152#comment-3039</guid>
		<description>foul.... need examples of use, not just jscript, need html, etc.

THANKS!</description>
		<content:encoded><![CDATA[<p>foul&#8230;. need examples of use, not just jscript, need html, etc.</p>
<p>THANKS!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

