#91 closed enhancement (fixed)
Improve parsing in Shared_Functions.get_dictionary_from_string(..)
| Reported by: | jcaffaro | Owned by: | Jerome Caffaro <jerome.caffaro@…> |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | WebSubmit | Version: | v0.99.1 |
| Keywords: | Cc: |
Description
The get_dictionary_from_string(..) taking care of parsing WebSubmit function parameters given using a syntax similar to Python dictionary would need to be improved.
Currently the function does not support commas (,) in keys and values, or colon (:) in values. For eg. the following returns unexpected values:
from invenio.websubmit_functions.Shared_Functions import get_dictionary_from_string
get_dictionary_from_string('{"foo,": "bar"}')
get_dictionary_from_string('{"foo": "bar,bar"}')
get_dictionary_from_string('{"foo:": "bar"}')
(colon ":" in values is to be quickly fixed in a soon to be integrated patch, but a cleaner approach is still needed)
Change History (2)
comment:1 Changed 3 years ago by Jerome Caffaro <jerome.caffaro@…>
- Owner set to Jerome Caffaro <jerome.caffaro@…>
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

In [27b839d58ba764a3d6ac21d85504e7ea967d3c94]: