Export to JSON error

Hi all,

I am trying to export form submissions to JSON using Aggregate Server. When
using the export tool in the "Submissions" tab all works well and I get a
valid JSON file as long as only one submission is present, but I get a
corrupted file when two or more submissions are present.

I have tried to export when the submissions are filtered, to display only
one submission, and also when submissions per page is set to 1. In both
cases all submissions present are exported and errors appear when I try to
open or process the file.

I get the following error in my JSON Editor:

Error: Parse error on line 1:
...-969f-caeca969bd92"}{"data_submitter":"E
-----------------------^
Expecting 'EOF', '}', ',', ']', got '{'

Any ideas...workarounds?

Thanks

Thank you for reporting this. I have created this issue:
http://code.google.com/p/opendatakit/issues/detail?id=962

It does look like the publisher only works correctly when publishing one
record at a time to the receiving server. When it publishes multiple
records in one request, it does not properly emit commas between each
record.

Mitch

··· On Sun, Jan 19, 2014 at 6:16 PM, Are Strom wrote:

Hi all,

I am trying to export form submissions to JSON using Aggregate Server.
When using the export tool in the "Submissions" tab all works well and I
get a valid JSON file as long as only one submission is present, but I get
a corrupted file when two or more submissions are present.

I have tried to export when the submissions are filtered, to display only
one submission, and also when submissions per page is set to 1. In both
cases all submissions present are exported and errors appear when I try to
open or process the file.

I get the following error in my JSON Editor:

Error: Parse error on line 1:
...-969f-caeca969bd92"}{"data_submitter":"E
-----------------------^
Expecting 'EOF', '}', ',', ']', got '{'

Any ideas...workarounds?

Thanks

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hi Mitch,

Thanks for the quick response on this. I just updated to the new Aggregate
Server v1.4.1 and exported a few surveys to json. Unfortunately I am still
getting errors. When I export only one survey at a time and try to open the
resulting file I get the following error:

Error: Parse error on line 1:
{{"data_submitter":"L
-^
Expecting 'STRING', '}', got '{'

validated by jsonlint http://zaach.github.com/jsonlint/

I can fix this by manually removing the extra brackets "{" and "}" on
either end of the file and saving. The file will then parse correctly
without error. Not ideal, but something I can script a workaround for.

When I export more than one survey at a time to json and try to open the
resulting file I get the same error as above. When I again manually remove
the extra brackets I get the following error:

Error: Parse error on line 1:
...-87ce-f16d475ee021"},{"data_submitter":"
-----------------------^
Expecting 'EOF', got ','

Otherwise the new Aggregate Server appears to work great,

Thanks again

··· On Sunday, January 19, 2014 7:37:39 PM UTC-8, Mitch Sundt wrote: > > Thank you for reporting this. I have created this issue: > http://code.google.com/p/opendatakit/issues/detail?id=962 > > It does look like the publisher only works correctly when publishing one > record at a time to the receiving server. When it publishes multiple > records in one request, it does not properly emit commas between each > record. > > > Mitch > > > > On Sun, Jan 19, 2014 at 6:16 PM, Are Strom <are....@gmail.com wrote: > >> Hi all, >> >> I am trying to export form submissions to JSON using Aggregate Server. >> When using the export tool in the "Submissions" tab all works well and I >> get a valid JSON file as long as only one submission is present, but I get >> a corrupted file when two or more submissions are present. >> >> I have tried to export when the submissions are filtered, to display only >> one submission, and also when submissions per page is set to 1. In both >> cases all submissions present are exported and errors appear when I try to >> open or process the file. >> >> I get the following error in my JSON Editor: >> >> Error: Parse error on line 1: >> ...-969f-caeca969bd92"}{"data_submitter":"E >> -----------------------^ >> Expecting 'EOF', '}', ',', ']', got '{' >> >> Any ideas...workarounds? >> >> Thanks >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

I just got another report of this problem. I will try to get an update out
as soon as possible.

··· On Wed, Feb 19, 2014 at 10:04 AM, Are Strom wrote:

Hi Mitch,

Thanks for the quick response on this. I just updated to the new Aggregate
Server v1.4.1 and exported a few surveys to json. Unfortunately I am still
getting errors. When I export only one survey at a time and try to open the
resulting file I get the following error:

Error: Parse error on line 1:
{{"data_submitter":"L
-^
Expecting 'STRING', '}', got '{'

validated by jsonlint http://zaach.github.com/jsonlint/

I can fix this by manually removing the extra brackets "{" and "}" on
either end of the file and saving. The file will then parse correctly
without error. Not ideal, but something I can script a workaround for.

When I export more than one survey at a time to json and try to open the
resulting file I get the same error as above. When I again manually remove
the extra brackets I get the following error:

Error: Parse error on line 1:
...-87ce-f16d475ee021"},{"data_submitter":"
-----------------------^
Expecting 'EOF', got ','

Otherwise the new Aggregate Server appears to work great,

Thanks again

On Sunday, January 19, 2014 7:37:39 PM UTC-8, Mitch Sundt wrote:

Thank you for reporting this. I have created this issue:
http://code.google.com/p/opendatakit/issues/detail?id=962

It does look like the publisher only works correctly when publishing one
record at a time to the receiving server. When it publishes multiple
records in one request, it does not properly emit commas between each
record.

Mitch

On Sun, Jan 19, 2014 at 6:16 PM, Are Strom are....@gmail.com wrote:

Hi all,

I am trying to export form submissions to JSON using Aggregate Server.
When using the export tool in the "Submissions" tab all works well and I
get a valid JSON file as long as only one submission is present, but I get
a corrupted file when two or more submissions are present.

I have tried to export when the submissions are filtered, to display
only one submission, and also when submissions per page is set to 1. In
both cases all submissions present are exported and errors appear when I
try to open or process the file.

I get the following error in my JSON Editor:

Error: Parse error on line 1:
...-969f-caeca969bd92"}{"data_submitter":"E
-----------------------^
Expecting 'EOF', '}', ',', ']', got '{'

Any ideas...workarounds?

Thanks

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Looks like the installers I put up were incorrectly missing the fix for
this.

I have just updated the 1.4.1 installers. Download and re-run the
installer (the VM has not yet been updated).

The expected output is a list of values

[ { submission object1 }, { submission object2 }, ... ]

··· On Wed, Feb 19, 2014 at 10:26 AM, Mitch Sundt wrote:

I just got another report of this problem. I will try to get an update out
as soon as possible.

On Wed, Feb 19, 2014 at 10:04 AM, Are Strom are.strom@gmail.com wrote:

Hi Mitch,

Thanks for the quick response on this. I just updated to the new
Aggregate Server v1.4.1 and exported a few surveys to json. Unfortunately I
am still getting errors. When I export only one survey at a time and try to
open the resulting file I get the following error:

Error: Parse error on line 1:
{{"data_submitter":"L
-^
Expecting 'STRING', '}', got '{'

validated by jsonlint http://zaach.github.com/jsonlint/

I can fix this by manually removing the extra brackets "{" and "}" on
either end of the file and saving. The file will then parse correctly
without error. Not ideal, but something I can script a workaround for.

When I export more than one survey at a time to json and try to open the
resulting file I get the same error as above. When I again manually remove
the extra brackets I get the following error:

Error: Parse error on line 1:
...-87ce-f16d475ee021"},{"data_submitter":"
-----------------------^
Expecting 'EOF', got ','

Otherwise the new Aggregate Server appears to work great,

Thanks again

On Sunday, January 19, 2014 7:37:39 PM UTC-8, Mitch Sundt wrote:

Thank you for reporting this. I have created this issue:
http://code.google.com/p/opendatakit/issues/detail?id=962

It does look like the publisher only works correctly when publishing one
record at a time to the receiving server. When it publishes multiple
records in one request, it does not properly emit commas between each
record.

Mitch

On Sun, Jan 19, 2014 at 6:16 PM, Are Strom are....@gmail.com wrote:

Hi all,

I am trying to export form submissions to JSON using Aggregate Server.
When using the export tool in the "Submissions" tab all works well and I
get a valid JSON file as long as only one submission is present, but I get
a corrupted file when two or more submissions are present.

I have tried to export when the submissions are filtered, to display
only one submission, and also when submissions per page is set to 1. In
both cases all submissions present are exported and errors appear when I
try to open or process the file.

I get the following error in my JSON Editor:

Error: Parse error on line 1:
...-969f-caeca969bd92"}{"data_submitter":"E
-----------------------^
Expecting 'EOF', '}', ',', ']', got '{'

Any ideas...workarounds?

Thanks

--

Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hi Mitch,

I tested the new version this morning and everything works perfectly. I'm
getting valid json output regardless of the number of surveys.

Thanks again for the quick response.

··· On Wednesday, February 19, 2014 12:08:00 PM UTC-8, Mitch Sundt wrote: > > Looks like the installers I put up were incorrectly missing the fix for > this. > > I have just updated the 1.4.1 installers. Download and re-run the > installer (the VM has not yet been updated). > > The expected output is a list of values > > [ { submission object1 }, { submission object2 }, ... ] > > > > On Wed, Feb 19, 2014 at 10:26 AM, Mitch Sundt <mitche...@gmail.com wrote: > >> I just got another report of this problem. I will try to get an update >> out as soon as possible. >> >> >> >> On Wed, Feb 19, 2014 at 10:04 AM, Are Strom <are....@gmail.com wrote: >> >>> Hi Mitch, >>> >>> Thanks for the quick response on this. I just updated to the new >>> Aggregate Server v1.4.1 and exported a few surveys to json. Unfortunately I >>> am still getting errors. When I export only one survey at a time and try to >>> open the resulting file I get the following error: >>> >>> Error: Parse error on line 1: >>> {{"data_submitter":"L >>> -^ >>> Expecting 'STRING', '}', got '{' >>> >>> validated by jsonlint >>> >>> I can fix this by manually removing the extra brackets "{" and "}" on >>> either end of the file and saving. The file will then parse correctly >>> without error. Not ideal, but something I can script a workaround for. >>> >>> When I export more than one survey at a time to json and try to open the >>> resulting file I get the same error as above. When I again manually remove >>> the extra brackets I get the following error: >>> >>> Error: Parse error on line 1: >>> ...-87ce-f16d475ee021"},{"data_submitter":" >>> -----------------------^ >>> Expecting 'EOF', got ',' >>> >>> >>> Otherwise the new Aggregate Server appears to work great, >>> >>> Thanks again >>> >>> >>> On Sunday, January 19, 2014 7:37:39 PM UTC-8, Mitch Sundt wrote: >>> >>>> Thank you for reporting this. I have created this issue: >>>> http://code.google.com/p/opendatakit/issues/detail?id=962 >>>> >>>> It does look like the publisher only works correctly when publishing >>>> one record at a time to the receiving server. When it publishes multiple >>>> records in one request, it does not properly emit commas between each >>>> record. >>>> >>>> >>>> Mitch >>>> >>>> >>>> >>>> On Sun, Jan 19, 2014 at 6:16 PM, Are Strom wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am trying to export form submissions to JSON using Aggregate Server. >>>>> When using the export tool in the "Submissions" tab all works well and I >>>>> get a valid JSON file as long as only one submission is present, but I get >>>>> a corrupted file when two or more submissions are present. >>>>> >>>>> I have tried to export when the submissions are filtered, to display >>>>> only one submission, and also when submissions per page is set to 1. In >>>>> both cases all submissions present are exported and errors appear when I >>>>> try to open or process the file. >>>>> >>>>> I get the following error in my JSON Editor: >>>>> >>>>> Error: Parse error on line 1: >>>>> ...-969f-caeca969bd92"}{"data_submitter":"E >>>>> -----------------------^ >>>>> Expecting 'EOF', '}', ',', ']', got '{' >>>>> >>>>> Any ideas...workarounds? >>>>> >>>>> Thanks >>>>> >>>>> -- >>>>> -- >>>>> Post: opend...@googlegroups.com >>>>> Unsubscribe: opendatakit...@googlegroups.com >>>>> >>>>> Options: http://groups.google.com/group/opendatakit?hl=en >>>>> >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "ODK Community" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to opendatakit...@googlegroups.com. >>>>> >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> Mitch Sundt >>>> Software Engineer >>>> University of Washington >>>> mitche...@gmail.com >>>> >>> -- >>> -- >>> Post: opend...@googlegroups.com >>> Unsubscribe: opendatakit...@googlegroups.com >>> Options: http://groups.google.com/group/opendatakit?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "ODK Community" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to opendatakit...@googlegroups.com . >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Mitch Sundt >> Software Engineer >> University of Washington >> mitche...@gmail.com >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Hi,
Same problem:
Expecting 'EOF', '}', ',', ']', got '{'

I see this is old topic, but problem still exist on aggregate v2.0.5. when you want to publish data via json server, for BOTH uploading and streaming new data. Any workaround available?

Also noticed in published json:
Key - "url" for picture/sketch starts with
http://aggregate.vagrantup.com:10080/view/binaryData?blobKey=test.....

should be
http://myserver.com:10080/....