BookmarkSubscribeRSS Feed

It seems as though the JSON (JavaScript Object Notation) format is quickly becoming a standard alongside XML with respect to data acquired via web services.  I'd like to see PROC JSON incorporate the ability to read JSON-format datasets in addition to the already-existing write functionality.

3 Comments
FriedEgg
SAS Employee

I would like to see XML and JSON objects in PROC DS2 especially since the release of the HTTP package to process response streams.

ATT
Calcite | Level 5
Calcite | Level 5

The enhancements in 9.4 M3 are great to see but it would be great to see this feature available via a GUI. Other tools are making strong progress in this area:

https://www.domo.com/product/connectors

https://www.tableau.com/about/blog/2016/8/tableau-101-beta-here-58447

 

 

ChrisHemedinger
Community Manager
Status changed to: Suggestion Implemented

The ability to read/parse JSON as data is now in SAS 9.4 Maint 4.  See:

Simple example:

 

filename resp temp;
 
/* Neat service from Open Notify project */
proc http 
 url="http://api.open-notify.org/astros.json"
 method= "GET"
 out=resp;
run;
 
/* Assign a JSON library to the HTTP response */
libname space JSON fileref=resp;
 
/* Print result, dropping automatic ordinal metadata */
title "Who is in space right now? (as of &sysdate)";
proc print data=space.people (drop=ordinal:);
run;

Output:

 

Who is in space right now? (as of 07DEC16)

     Obs    craft          name

       1     ISS     Sergey Rizhikov 
       2     ISS     Andrey Borisenko
       3     ISS     Shane Kimbrough 
       4     ISS     Oleg Novitskiy  
       5     ISS     Thomas Pesquet  
       6     ISS     Peggy Whitson   

 

Marking this as Delivered.