cancel
Showing results for 
Search instead for 
Did you mean: 

json input adapter root path

Former Member
0 Kudos

Hi all,

What should I set to roothpath fo JSON Input file adapter when json data do not include root? What I try is to get following json data into an ESP window.

{"sessionid":"14697550182","time":"2013-Nov-03 12:41:18","size":"2434","payload":"1902","medium":"1"}

{"sessionid":"14697550183","time":"2013-Nov-03 12:41:18","size":"1926","payload":"1394","medium":"1"}

When I wrote * to rootpath but I get following error:

jsonRootpath = '\"*\"' ,

jsonRootpath = '*' ,

jsonRootpath = '"*"' ,

all of them gives following error.

07-31-2014 12:46:34.440 ERROR [Thread-18] (JSONInFormatter.getMultiRecordsByRootPath) Error code:402305, Severity : 3 (Error)

Error message:Invalid rootpath, please check the JSON rootpath.

Error description:Invalid rootpath, please check the JSON rootpath.

07-31-2014 12:46:34.441 ERROR [Thread-18] (JSONInFormatter.convert) Exception is thrown

java.lang.Exception: Error code:402305, Severity : 3 (Error)

Do you have any ideas?

Thanks and regards,

Bulut

Accepted Solutions (1)

Accepted Solutions (1)

RobertWaywell
Product and Topic Expert
Product and Topic Expert
0 Kudos

According to the SP08 docs, the jsonRootpath is an optional parameter. Based on that, have you tried not specifying the jsonRootpath?

Former Member
0 Kudos

Ys, I tried not specifying the jsonRootpath but it didn't work. Compilation gives the following error when I do not specifying root path. This means that jsonRootpath is not an optinal parameter

DescriptionResourcePathLocationType

[ESP-3-157502] Error occurred while validating property jsonRootpath for adapter File_Hadoop_JSON_Input2.

Parameter 'jsonRootpath' (JSON Root Path) may not be left unspecified
former_member217348
Participant
0 Kudos

Hello,

I'm not a json expert, but I have the following suggestions:

1. Please see if the answer provided in http://scn.sap.com/message/14403192#14403192 will shed any light.

2. Please see if the information provided in the ESP 5.1 SP04 Release Bulletin for CR 748713 will help: SyBooks Online

Thanks,

Alice


Former Member
0 Kudos

Hi Alice,

Thank you for your answer.

Editing toolkit_file_json_input.cnxml and changing jsonrootPath parameter to optinal worked for me .

Thanks again.

Regards,

Bulut

Answers (0)