[10:03:18] [telegram] https://t.me/+9pvudolri0YwZTM0 [13:40:18] [telegram] Hi, when I'm trying to create a JSON file via MediaWiki API, I get the warning "{code: "invalid-content-data", info: "Invalid content data",…}", why? [13:43:02] [telegram] Because you're passing something invalid? [13:43:17] [telegram] You'll need to give the example query/data you're using for anyone to be able to even begin to help [13:52:29] [telegram] I've added jsbin link. (re @tehreedy: You'll need to give the example query/data you're using for anyone to be able to even begin to help) [15:31:21] [telegram] if that’s trying to edit this page (https://tr.wikipedia.org/wiki/Kullan%C4%B1c%C4%B1:Chester_Tester/Adiutor-Options.json) (which already contains some JSON), then I don’t think `appendtext` will work, you can’t append two pieces of JSON together and still have valid JSON at the end [15:31:55] [telegram] so you probably need to use `text` instead of `appendtext`, and if you want to include the old content, you’ll need to merge it with the new data you’re sending yourself [15:44:33] yeah, the closing } will get you for appendtext [15:45:05] best to get the page text, deserialize, edit the data itself, then reserialize and save [22:06:40] [telegram] By the way, I changed with "text" but I'm still getting the same error, when I changed the file name adiutor-options.js it worked, not working with json. (re @lucaswerkmeister: so you probably need to use text instead of appendtext, and if you want to include the old content, you’ll need to merge it with...) [22:07:06] [telegram] strange… [22:07:19] [telegram] perhaps the JSON content model only accepts objects, not arrays or other JSON value types? [22:07:26] [telegram] (I thought it accepted everything but I might be wrong) [22:08:36] [telegram] I guess it's not creating the page with the json suffix. [22:08:59] [telegram] it looks like it should accept any value type, so I don’t think that’s it after all [22:09:46] [telegram] ohh, you might need to set not only the `contentmodel`, but also the `contentformat`? (to `application/json`)