Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
Haran opened this Issue · 6 comments

7 participants

@Haran

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
@eshryane eshryane referenced this issue from a commit
@eshryane eshryane Fixed #114 - JSON response format should contain an "object" array wi…
…thin the "objects" element.
1542651
@eshryane eshryane modified the milestone: whois-1.71.1, whois-1.72
@wungad

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.

@eshryane
Owner

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
@wungad

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

@eshryane
Owner

We expect to have another release in the coming weeks.

@agoston

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

@secynic secynic referenced this issue in secynic/ipwhois
Closed

ASN Registry Error #29

@angelaripe angelaripe was assigned by agoston
@secynic secynic referenced this issue in secynic/ipwhois
Closed

RIPE RWS support #31

@pires

+1

@ripe-denis ripe-denis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.