Suppose a text field includes a double quote ("). I am downloading survey
results in json format, and my json file looks like this:
{"SurveyDate":"2013-12-19","Description":"Something is 12" wide."}
When I go to parse the data, I get an error due to the quotes within the
description.
Is there a way to design my XLSForm to substitute '"' whenever a user puts
double quotes in a text field?
Is there another simple solution to this problem?
Note: I originally tried CSV format, but ran into a similar problem when a
text field included a comma.
Suppose a text field includes a double quote ("). I am downloading survey results in json format, and my json file looks like this:{"SurveyDate":"2013-12-19","Description":"Something is 12" wide."}
When I go to parse the data, I get an error due to the quotes within the description.
Is there a way to design my XLSForm to substitute '"' whenever a user puts double quotes in a text field?
Is there another simple solution to this problem?
Note: I originally tried CSV format, but ran into a similar problem when a text field included a comma.
Thanks for your help.
-Steve
···
On Friday, December 20, 2013 3:24:31 AM UTC+5:30, Steven Hansen wrote:
On Friday, December 20, 2013 3:24:31 AM UTC+5:30, Steven Hansen wrote:
Suppose a text field includes a double quote ("). I am downloading survey results in json format, and my json file looks like this:{"SurveyDate":"2013-12-19","Description":"Something is 12" wide."}
When I go to parse the data, I get an error due to the quotes within the description.
Is there a way to design my XLSForm to substitute '"' whenever a user puts double quotes in a text field?
Is there another simple solution to this problem?
Note: I originally tried CSV format, but ran into a similar problem when a text field included a comma.
I have pushed a fix for the JSON publisher and also for the CSV publisher
-- they both were not correctly handling strings containing double-quotes.
This will be in the next ODK Aggregate release.
Unfortunately, Microsoft Excel does not respect RFC 4180 (the
not-a-real-standard defining CSV file formats).
CSV imports into Excel often need to be adjusted because of this.
···
On Fri, Dec 20, 2013 at 2:40 AM, Yaw Anokwa wrote:
On Friday, December 20, 2013 3:24:31 AM UTC+5:30, Steven Hansen wrote:
Suppose a text field includes a double quote ("). I am downloading
survey results in json format, and my json file looks like
this:{"SurveyDate":"2013-12-19","Description":"Something is 12" wide."}
When I go to parse the data, I get an error due to the quotes within
the description.
Is there a way to design my XLSForm to substitute '"' whenever a user
puts double quotes in a text field?
Is there another simple solution to this problem?
Note: I originally tried CSV format, but ran into a similar problem
when a text field included a comma.