Created
May 13, 2014 16:45
-
-
Save randyzwitch/e9813740389df976c5a8 to your computer and use it in GitHub Desktop.
Inefficient way to build JSON in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Converts report_suites to JSON | |
if(length(report_suites)>1){ | |
report_suites <- toJSON(report_suites) | |
} else { | |
report_suites <- toJSON(list(report_suites)) | |
} | |
#API request | |
json <- postRequest("ReportSuite.GetTrafficVars",paste('{"rsid_list":', report_suites , '}')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment