Really new to R so please forgive me if this is really basic.
I'm running a system command to query a string from a website that comes back in json text and then using the jsonlite library. The string is long and it puts it into multiple character arrays. Each array is 8095 characters. When I feed that into fromJSON it joins the character arrays with spaces which happen to fall in between numbers so the fromJSON
parser fails.
>test <- system("...somecomand", intern = TRUE)
>str(test)
chr [1:4] "{\"number\":52.55"|__truncated___...
>test_df <- fromJSON(test)
Error: parse error: after key and value, inside map, I expect ',' or '}'
lume":36265,"datetime":159196 9500000},{"open":43.62,"high":
(right here) ------^
Where it indicates (right here) is where it added a space between numbers.
I tried adding the character arrays together with cat and paste. I haven't tried saving it to a file and I'm not sure if there is a way to stream it to the parser. I'm probably using strings/characters incorrectly. Appreciated if someone could point me in the right direction.
Thanks.