API Guide?

2 views
Skip to first unread message

Matthew Briney

unread,
Sep 21, 2010, 7:04:45 PM9/21/10
to Google Elections Center API Users
Are there any more detailed specifications for parsing the JSON
results? I noticed for example that there are multiple numbered
arrays for polling locations and querying some addresses return blank
arrays?

Daniel Berlin

unread,
Sep 30, 2010, 11:21:05 AM9/30/10
to election-cen...@googlegroups.com
On Tue, Sep 21, 2010 at 7:04 PM, Matthew Briney <mat...@emotivellc.com> wrote:
> Are there any more detailed specifications for parsing the JSON
> results?

Not yet

> I noticed for example that there are multiple numbered
> arrays for polling locations

Yes, in APIv1 ti does this, which can be a bit confusing.

> and querying some addresses return blank
> arrays?
>

This is a bug i will fix.
It finds the street segments and sees there are polling locations and
contests, but it turns out the polling locations and contests are for
a different election id than whatever you asked for, so it filters
them out and gets empty lists, but doesn't set the status code.

Daniel Berlin

unread,
Sep 30, 2010, 11:28:07 AM9/30/10
to election-cen...@googlegroups.com
On Thu, Sep 30, 2010 at 11:21 AM, Daniel Berlin <dan...@google.com> wrote:
> On Tue, Sep 21, 2010 at 7:04 PM, Matthew Briney <mat...@emotivellc.com> wrote:
>> Are there any more detailed specifications for parsing the JSON
>> results?
>
> Not yet
>
>> I noticed for example that there are multiple numbered
>> arrays for polling locations
> Yes, in APIv1 ti does this, which can be a bit confusing.

I forgot to explain why this is, sorry.
Prior to starting v2, the way the pipeline worked when it had multiple
sources providing the same street segment, was to simply list all of
them as possibilities.
The API produced one array of locations/contests for each street
segment it found, so you got an array of arrays of locations and an

The pipeline no longer does it this way, because nobody found it that useful :)

So you should never see more than one element in the outer array anymore.

Reply all
Reply to author
Forward
0 new messages