j_data_type() # available types
j_data_type("") # json
j_data_type('{"a": 1}') # json
j_data_type(c('[{"a": 1}', '{"a": 2}]')) # json
j_data_type(c('{"a": 1}', '{"a": 2}')) # ndjson
j_data_type(list(a = 1, b = 2)) # R
fl <- system.file(package = "rjsoncons", "extdata", "example.json")
j_data_type(fl) # c('json', 'file')
j_data_type(readLines(fl)) # json
j_path_type() # available types
j_path_type("") # JSONpointer
j_path_type("/locations/0/name") # JSONpointer
j_path_type("$.locations[0].name") # JSONpath
j_path_type("locations[0].name") # JMESpath
Run the code above in your browser using DataLab