Skip to content

API create file PUT gives Problems parsing JSON error #21447

Answered by NetsuiteVS
NetsuiteVS asked this question in General
Discussion options

You must be logged in to vote

You can see the base64 content on the picture. In the content parameter’s value.
Meanwhile I found the solution. Netsuite transformed the body json in the background from
“message”: “some message”
to
message": {“some message”} .
Solution is giving json as string format:

var bodyObj = JSON.stringify({
    "message": "commit message",
    "content": fileObjBase64
});

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants