Timeline for Convert Valve KV into JSON
Current License: CC BY-SA 3.0
29 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Nov 19, 2017 at 18:04 | vote | accept | Kroltan | ||
| Nov 5, 2015 at 0:59 | comment | added | Dennis | What do you mean by Can you edit the post to explain backslashes?? | |
| Nov 5, 2015 at 0:55 | comment | added | Kroltan | @Dennis It is different from the usual, yes. I thought this made it simpler as a challenge, since you don't need extra rules. Can you edit the post to explain backslashes? I think I'd make it too confusing. ("\n\N" "\\" => {"\n\N": "\\"}, so yes it escapes newlines and quotes, but can be escaped too) | |
| Nov 4, 2015 at 4:45 | comment | added | Dennis | OK, the last test cases is completely different from how vdf behaves (it doesn't allow newlines in keys and \" is a backash and a quote). Before I rewrite my code once again, can backslashes escape anything else, including themselves? What should the output of "\n\N" "\\" be? | |
| Nov 3, 2015 at 23:55 | history | edited | Kroltan | CC BY-SA 3.0 | added escaped quotes case |
| Nov 3, 2015 at 21:54 | comment | added | Kroltan | @Dennis Regarding definition of character: Whatever your language supports. I'll add some escaping cases. | |
| Nov 3, 2015 at 15:40 | comment | added | Dennis | Also, you might want to include some test cases that involve backslashes and escaped double quotes. | |
| Nov 3, 2015 at 13:28 | comment | added | Dennis | So, when you say any character, do you mean Unicode, ASCII, printable ASCII and newlines, or something else? | |
| Nov 3, 2015 at 10:51 | history | edited | Kroltan | CC BY-SA 3.0 | added 1 character in body |
| Nov 3, 2015 at 10:50 | comment | added | Kroltan | @PeterTaylor That`s correct, edited the question. Also, thanks for the edit. | |
| Nov 3, 2015 at 7:22 | comment | added | Peter Taylor | Also, your spec forces text to contain exactly one char, but all of your examples have texts with multiple chars. What should the spec say? 0 or more chars? 1 or more chars? | |
| Nov 3, 2015 at 7:19 | history | edited | Peter Taylor | CC BY-SA 3.0 | added 88 characters in body |
| Nov 3, 2015 at 7:18 | comment | added | Peter Taylor | It's important to note that certain characters must be escaped in JSON strings. Since they aren't escaped in your KV format (I don't know whether your comment about laziness means that they are in the original KV spec), it's important to have some test cases which cover them. | |
| Nov 3, 2015 at 6:59 | comment | added | edc65 | In your pseudo BNF, it seems that text can contain exactly 1 char | |
| Nov 3, 2015 at 5:50 | comment | added | Dennis | If was going to submit import json,vdf;lambda x:json.dumps(vdf.parse(x),indent=4) (Python 2, 58 bytes before bonus), but vdf requires brackets to be on their own line. It also reorders the dictionaries, and I'm not sure if this is allowed. | |
| Nov 3, 2015 at 4:55 | answer | added | Dennis | timeline score: 1 | |
| Nov 3, 2015 at 3:47 | history | edited | Kroltan | CC BY-SA 3.0 | added 183 characters in body |
| Nov 3, 2015 at 3:01 | history | tweeted | twitter.com/StackCodeGolf/status/661377748393435136 | ||
| Nov 3, 2015 at 1:28 | history | edited | Kroltan | CC BY-SA 3.0 | added bonus |
| Nov 2, 2015 at 23:25 | history | edited | Kroltan | CC BY-SA 3.0 | whitespace rule |
| Nov 2, 2015 at 23:24 | comment | added | feersum | I think it's better to leave the EBNF uncluttered and state the whitespace rules elsewhere. | |
| Nov 2, 2015 at 23:23 | history | edited | Kroltan | CC BY-SA 3.0 | silly EBNF typo |
| Nov 2, 2015 at 23:22 | comment | added | Kroltan | @feersum No. You can assume a space only between two <text>s. "a"{} is valid, "a""b" isn't, but "a" "b" is. Should I include whitespace on the EBNF? | |
| Nov 2, 2015 at 23:13 | comment | added | feersum | Can we assume that all tokes are separated by at least one whitespace? | |
| Nov 2, 2015 at 23:02 | history | edited | Kroltan | CC BY-SA 3.0 | added 43 characters in body |
| Nov 2, 2015 at 23:01 | comment | added | Kroltan | @feersum Sorry. It starts on <pair>. Edited question. | |
| Nov 2, 2015 at 23:00 | comment | added | feersum | In terms of the EBNF, what does the entire input need to be? | |
| Nov 2, 2015 at 22:58 | history | asked | Kroltan | CC BY-SA 3.0 |