{"id":525,"date":"2014-07-11T15:57:25","date_gmt":"2014-07-11T13:57:25","guid":{"rendered":"http:\/\/www.netnea.com\/cms\/?p=525"},"modified":"2014-07-22T19:08:31","modified_gmt":"2014-07-22T17:08:31","slug":"converting-iana-enterprise-numbers-to-json","status":"publish","type":"post","link":"https:\/\/www.netnea.com\/cms\/2014\/07\/11\/converting-iana-enterprise-numbers-to-json\/","title":{"rendered":"converting IANA enterprise-numbers to JSON"},"content":{"rendered":"<p>http:\/\/www.iana.org\/assignments\/enterprise-numbers maps all\u00a0SMI Network Management Private Enterprise Codes in\u00a0iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) to\u00a0organizations, contacts and e-mails. I had to convert this file in JSON to be able to load it into <a href=\"https:\/\/github.com\/cbueche\/Agent-Jones\">Agent-Jones<\/a>, my SNMP web-service.<\/p>\n<p>At first look, the file looks easy to parse. However, it is buggy at many places, with wrong number of spaces, line-continuations, empty lines, etc.<\/p>\n<p>I wrote a <a href=\"https:\/\/github.com\/cbueche\/Agent-Jones\/tree\/master\/util\">quick script<\/a> to solve the issue. Use it as<\/p>\n<p><code>python iana_enterprise_numbers_convert.py \\<br \/>\n-i http:\/\/www.iana.org\/assignments\/enterprise-numbers \\<br \/>\n-o .\/enterprise-numbers.json<br \/>\n<\/code><\/p>\n<p>The resulting file should be valid json.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.iana.org\/assignments\/enterprise-numbers maps all\u00a0SMI Network Management Private Enterprise Codes in\u00a0iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) to\u00a0organizations, contacts and e-mails. I had to convert this file in JSON to be able to load it into Agent-Jones, my SNMP web-service. At first look, the file looks easy to parse. However, it is buggy at many places, with wrong number of spaces, line-continuations, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":{"0":"post-525","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-nms","7":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/comments?post=525"}],"version-history":[{"count":3,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/525\/revisions"}],"predecessor-version":[{"id":529,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/525\/revisions\/529"}],"wp:attachment":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/media?parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/categories?post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/tags?post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}