Not happy with my beautiful json.

#48 · open · 4 comments

View on GitHub ↗

iandoug

Hi Am trying to write your format file from KLA json. It would be convenient to specify all 4 slots on a key at the same time, even if some are empty. Your program does not like my input, but I can't see what the error is. Error in $: Failed reading: Cannot decode input: Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream. Expecting object value at ',,,]},' [zxcv-fingers.en.ansi.txt](https://github.com/39aldo39/klfc/files/8693888/zxcv-fingers.en.ansi.txt) Any ideas? Thanks, Ian

Comments

39aldo39

While your JSON is indeed beautiful, it is also invalid :( The `'` at key `AC11` is not allowed to be escaped. That fixes the error, after also changing `localeID` to `localeId`, but that error is clearer.

iandoug

So noted, thanks. I was using PHP addslashes function, instead of manually checking each of the four slots for chars to escape. PHP and Json have different ideas about what needs to be escaped ... Thanks, Ian

iandoug

Ok, PHP was FOS with the escaping so I programmed around it and it works now. What exactly do the scripts do with XCompose? I can't quite figure it out ... or why they need to do anything with it. I'm only going to do the "conventional ANSI" layouts for now, need to figure out how to specify things that make creative use of non-letter keys. Thanks, Ian

iandoug

BTW good job on this.