question

studioalfredwalker avatar image
studioalfredwalker asked

Cannot upload json for title data of content.

Hi, I'm having a problem with uploading json file for title data.

I tried to upload all kinds of json files I have(including empty file), but always same error cames out:

"There was an error parsing your file. Please check your JSON syntax."

I attach one of those json:

{"TEST":{"GROUP_ID":1}}

I also validated json via below site, but there was no syntax errors.

(https://jsonformatter.curiousconcept.com/)

Please let me know if there exists something I missed.

Thanks.

p.s. My studio ID is DFA.

Title DataContent
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

studioalfredwalker avatar image studioalfredwalker commented ·

There was an typing error. Not studio ID, but title ID

0 Likes 0 ·
jrDev avatar image jrDev commented ·

@Brendan any help with my post below?


Thanks,

jrDev

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Sorry for the confusion - Title Data is actually stored as string/string. If you add the JSON above as a key in Title Data and then download your Title Data as JSON, you'll see that the file looks like this (assuming you named the key "Foo"):

{
  "foo": "{\"TEST\":{\"GROUP_ID\":1}}"
}

So the JSON format you need in order to upload is a JSON of all the key/value pairs of the data, but with the values being stringified JSON.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image jrDev commented ·

Hello,

What should I do to stringify my json file in preparation to uploading it into title data because so far I am getting syntax errors with this:

{
                   
"Points": {
"Point A": {
"Point 0 Weight": 0,
"Point 1 Weight": 0,
"Point 2 Weight": 0,
"Point 3 Weight": 0,
"Point 4 Weight": 0,
"Point 5 Weight": 0,
"Point 10 Weight": 0
}
}
}

Thanks,

jrDev

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.