klfc icon indicating copy to clipboard operation
klfc copied to clipboard

Not happy with my beautiful json.

Open iandoug opened this issue 2 years ago • 4 comments

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

Any ideas?

Thanks, Ian

iandoug avatar May 14 '22 21:05 iandoug

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.

39aldo39 avatar May 19 '22 09:05 39aldo39

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 avatar May 19 '22 10:05 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 avatar May 19 '22 10:05 iandoug

BTW good job on this.

iandoug avatar May 19 '22 10:05 iandoug