Deserializing Given Text File Into JSON
Good evening,
I've spent weeks trying to get the data out of this text file into a proper set of variables to use within my program. So far i've no luck, and my best attempt was to manually read and parse every individual line with a tedious set of boolean checks.
Any possible ways I could better parse this file?
6 Replies
I don't think there is no, unless the provider of that file gives you instructions or a library to handle that.
Sadly, no.
The file structure doesn't look that complicated
Assuming
#
lines are comments
You can use a simple regex expression like this to get both the key/tag and the file path ^([\w]{3}).*"(.*)"
regex101
regex101: build, test, and debug regex
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
New formats? This is just ini
Which does have libraries to deserialize
I’ll check it out, thank you. By tonight Ill see if I can’t get back to you.
I also may have sent the wrong file by mistake! I just noticed https://cdn.discordapp.com/attachments/787470009710018620/1031015013491683338/cultures.txt
This should be it