Hi According to www.json.org, the tilde is a valid identifier character. Which spec are you using?
In fact, pretty much anything except doublequote and backslash are valid characters in an identifier. -- Noel Grandin Greg Brown (JIRA) wrote: > [ > https://issues.apache.org/jira/browse/PIVOT-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > ] > > Greg Brown resolved PIVOT-549. > ------------------------------ > > Fix Version/s: (was: 2.0) > Resolution: Not A Problem > > Sorry for the confusion. This is not actually a bug. The tilde is not a valid > identifier character, so it can't be used unquoted in a JSON path (which is > what the textKey property expects). For example, the following is not a valid > JSON path: > > foo.~bar > > However, this is valid: > > foo["~bar"] > > So, to bind to a field rather than a bean property, you can do something like > the following: > > <TextInput textKey="['~bar']"/> > > >> Storing to fields with data binding doesn't work >> ------------------------------------------------ >> >> Key: PIVOT-549 >> URL: https://issues.apache.org/jira/browse/PIVOT-549 >> Project: Pivot >> Issue Type: Bug >> Components: core-beans >> Affects Versions: 1.5 >> Reporter: Michael Allman >> Attachments: Field_Bug.tgz >> >> >> Pivot allows you to prefix a textKey attribute value with a "~" to indicate >> that that property should be accessed via the object's field. Currently, it >> doesn't work. When I try to do it, I get an IllegalArgumentException: >> Illegal identifier character. >> I'm attaching a test case Eclipse project. Run FieldBug, put some stuff in >> the fields or not, and press "Store". You should see the exception. Set a >> breakpoint on the JSON.split method and rerun the app in the debugger. Step >> through and you'll see where the exception is being thrown. >> Cheers.
