asolfre / appengine-rest-server

Automatically exported from code.google.com/p/appengine-rest-server
Other
0 stars 0 forks source link

- replaced by _ in Dynamic Property Names #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I've encountered a problem with the rest server fetching a expando Model.

I'm using db Key's as names for the dynamic fields, resulting in a - in the 
name.
When fetching the items with the rest server the - in the key_name gets 
replaced by a _

Thanks a lot for the great rest server and with best regards

Gordon

Original issue reported on code.google.com by fe...@eligned.com on 6 Aug 2011 at 10:32

GoogleCodeExporter commented 9 years ago
currently, the code aggressively cleans field names to make them "xml safe".  
the '-' is safe to use in xml, so i can probably fix that.  you might have 
other problems, though, i don't know what all characters are legal for a db Key.

Original comment by jahlborn@gmail.com on 6 Aug 2011 at 12:06

GoogleCodeExporter commented 9 years ago
the '-' should now be allowed in property names.

Original comment by jahlborn@gmail.com on 6 Aug 2011 at 12:19

GoogleCodeExporter commented 9 years ago
thanks a lot.
the doc's state "A string-encoded key is an opaque value using characters safe 
for including in URLs".
Though i've to admit that i am not familiar with the allowed xml charset.
I would have guessed everything should be allowed using proper escaping?

I'm currently using the json output and input - i may have to do some more 
testing there..

again, thanks for the quick fix (just a side question: is it included in the 
normal download package?).

cheers, gordon

Original comment by fe...@eligned.com on 6 Aug 2011 at 5:35

GoogleCodeExporter commented 9 years ago
the fix is currently in trunk and will be in the 1.0.6 release.

xml _content_ allows just about any character with the proper escaping.  xml 
_element names_ have a much more restricted character set.  for instance, you 
couldn't use a ':' because that is the xml namespace separator or '<' and '>' 
because those are the part of the xml syntax.

Original comment by jahlborn@gmail.com on 7 Aug 2011 at 3:48

GoogleCodeExporter commented 9 years ago

Original comment by jahlborn@gmail.com on 6 Jun 2012 at 1:08