Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 26746 invoked from network); 1 Sep 2009 16:01:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Sep 2009 16:01:23 -0000 Received: (qmail 88999 invoked by uid 500); 1 Sep 2009 16:01:20 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 88946 invoked by uid 500); 1 Sep 2009 16:01:20 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 88936 invoked by uid 99); 1 Sep 2009 16:01:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 16:01:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 16:01:11 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MiVmt-0007xH-2l for user@struts.apache.org; Tue, 01 Sep 2009 09:00:51 -0700 Message-ID: <25243032.post@talk.nabble.com> Date: Tue, 1 Sep 2009 09:00:51 -0700 (PDT) From: Gadbury To: user@struts.apache.org Subject: Re: JSON plugin ignoring includeProperties parameter In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: gadbury@googlemail.com References: <440363eaa4.3eaa444036@noaa.gov> <25240134.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org The first regex returns nothing and the second everything (as before). My regex is pretty poor but if I ignore regex, what would the syntax be for accessing the property of a bean is a list in the map. i.e. given the map: private Map> productCategoriesMap Would it be: myMap['myKey'].beanProperty =20 myMap.myKey.beanProperty =20 or both, I seem to recall? Is it definitely possible to filter out properties of beans within a map using 0.33 / 0.34 (I've tried both) of the json plugin? Sorry to go on aout this - it's been driving me crazy all day :) Musachy Barroso wrote: >=20 > Java regexes are greedy by default if I dont remember wrong, so you > should try something like: >=20 > productCategoriesMap[.*?]\.name >=20 > or >=20 > productCategoriesMap\..*?\.name >=20 > musachy >=20 > On Tue, Sep 1, 2009 at 6:15 AM, Gadbury wrote: >> >> Hi, >> >> Sorry to jump a (dead?) thread but it's relevant to what I am trying to >> do >> and it made sense to put it in the same thread. >> >> I have the following HashMap: >> >> private Map> productCategoriesMap; >> >> in my includeProperties, productCategoriesMap.* populates the json with >> every property of the Category bean. =C2=A0For example: >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0{ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0"productCategoriesMap":{"ac80e9b6-29e6-4f00-9= 410-1a18a9dfd317":[{ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"UUID":"4bd497a1-= bd1b-417b-8d62-e1273fa5e648", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"name":"Test Sub-= Category EDIT", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0"parentCategoryUUID":"65750a38-d596-48d7-a215-56bcb21d8067", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0"providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0},{ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"UUID":"65750a38-= d596-48d7-a215-56bcb21d8067", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"name":"Category = 4", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0"parentCategoryUUID":"98e4b067-5b6b-4777-a28a-443a77209948", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >> =C2=A0"providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}] >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> >> However, I would like to only include UUID and name, as an example. =C2= =A0I >> have >> tried: >> >> productCategoriesMap.*.name >> productCategoriesMap.*.* >> productCategoriesMap[*].name >> productCategoriesMap.*\.name >> productCategoriesMap\.*\.name >> >> How do I use includeProperties to filter properties of beans within a >> map? >> -- >> View this message in context: >> http://www.nabble.com/JSON-plugin-ignoring-includeProperties-parameter-t= p23660860p25240134.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: user-help@struts.apache.org >> >> >=20 >=20 >=20 > --=20 > "Hey you! Would you help me to carry the stone?" Pink Floyd >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/JSON-plugin-ignoring-in= cludeProperties-parameter-tp23660860p25243032.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org