REST API JSON response duplicate declaration for 'object' property #114

Closed
Haran opened this Issue Jan 17, 2014 · 6 comments

Comments

Projects
None yet
7 participants

Haran commented Jan 17, 2014

Response for a query

http://rest.db.ripe.net/search?source=ripe&query-string=91.200.65.203

in JSON format returns a response where objects->object properties have multiple declarations. While in XML response each has property 'type':

<object xmlns="" type="inetnum">
    ...
</object>
<object xmlns="" type="person">
    ...
</object>

in JSON format it's duplicated:

"objects": {                  
    "object": [               
        {                     
            "type": "inetnum",
            ...
        },
    ],
    "object": [
        {                     
            "type": "organisation",
            ...
        },
    ],
    ...
},

After json_decode() the response is getting "cropped":

[objects] => stdClass Object (
        [object] => Array (
                [0] => stdClass Object (
                        [type] => route
                        ...

The only solution for me is an XML usage instead of JSON.

@eshryane eshryane closed this in 2c83a06 Jan 21, 2014

eshryane added a commit that referenced this issue Feb 6, 2014

@eshryane eshryane modified the milestones: whois-1.71.1, whois-1.72 Feb 6, 2014

wungad commented Feb 10, 2014

This is still na issue.
Testing with this: http://rest.db.ripe.net/search.json?query-string=193.189.160.13
objects -> object is declared multiple times.

Contributor

eshryane commented Feb 10, 2014

Thanks for your feedback - indeed this is still an issue in the current release 1.71. We have committed a fix for this (see above), which will be included in the next release.

I will re-open this issue for now (until the fix is released).

@eshryane eshryane reopened this Feb 10, 2014

wungad commented Feb 10, 2014

Yes, I have seen your commit. Thank you for re-opening this. Can you provide any info on availability of the next release?

Contributor

eshryane commented Feb 11, 2014

We expect to have another release in the coming weeks.

Contributor

agoston commented Feb 12, 2014

We're doing a review of JSON output in #130 .

@secynic secynic referenced this issue in secynic/ipwhois Feb 13, 2014

Closed

ASN Registry Error #29

@secynic secynic referenced this issue in secynic/ipwhois Feb 18, 2014

Closed

RIPE RWS support #31

pires commented Feb 24, 2014

+1

@ripe-denis ripe-denis closed this Mar 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment