*** BREAKING CHANGE in JSON path expressions ***

24 views
Skip to first unread message

Joni Freeman

unread,
Dec 29, 2010, 4:43:23 AM12/29/10
to lif...@googlegroups.com
Hi,

There's one breaking change starting from Lift 2.3-M1 (not released
yet). Previous versions of JSON path expressions returned JField which
unnecessarily complicates the use of the expressions. If you have used
path expressions with pattern matching like:

val JField("bar", JInt(x)) = json \ "foo" \ "bar"

It is now required to change that to:

val JInt(x) = json \ "foo" \ "bar"


It is pretty easy to find those by grepping:

ack-grep JField | ack-grep '\\'

After upgrading from Lift 2.2 please analyze the hits you get with the
above grep.

The changeset:

https://github.com/lift/lift/commit/754baaa3f464142f8518237e6a596f325e71b650

Cheers Joni


CM Lubinski

unread,
Dec 29, 2010, 6:14:40 PM12/29/10
to lif...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nice! It will require a lot of updating but will result in much less
cluttered code. Thanks for making this change.

CM Lubinski

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk0bwN8ACgkQfzi1OiZiJLAX+ACeJlsvv14ix4yX1kpzUJsUmgcC
fuEAniSupU7U7iUIu9D9iK3Lsko4PeBo
=MnnA
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages