Comments (2)
Interesting! I always had thought that ini was unspecified and thus a parsing nightmare depending on what program or person created the file. This looks doable, but I clearly need to familiarize myself with ini a bit more to understand any corner cases.
If anyone is interested in implementing this or is familiar enough to talk on behalf of ini, I'm all ears.
from faq.
Yeah, I expect that there's some skew possible due the lack of standards, so I'm perfectly willing to guess that this is arbitrarily hard to get exactly right for every possible version.
A quick look at other code that does this perhaps to help the next person along:
- PHP function parse_ini_file(): https://www.php.net/manual/en/function.parse-ini-file.php
- Python 3 configparser(): https://docs.python.org/3/library/configparser.html
- "simple INI parser in C", inih: https://github.com/benhoyt/inih
- C# parser: https://github.com/rickyah/ini-parser
Of these the last, ini-parser
, perhaps has the most flexibility in dealing with the existing variation in file types, and https://github.com/rickyah/ini-parser/wiki/Configuring-parser-behavior gives you some idea of the degrees of freedom that have evolved in response.
from faq.
Related Issues (20)
- Mac executable is not statically linked HOT 4
- "it seems like jq_start frees input" mystery explanation HOT 1
- "raw output" fails to encode HOT 7
- CSV HOT 7
- Explore gojq instead of linking to libjq HOT 1
- error: expected specifier-qualifier-list before 'jv' jv p1; HOT 4
- ARM builds for CI
- faq with no args blocks forever, while jq prints usage
- problem decoding XML, invalid attribute key label HOT 4
- Investigate goreleaser
- supporess the root tags when outputting with custom format string HOT 3
- Bypass XML decoding errors
- non-zero exit code on errors
- first example doesn't work HOT 1
- String length expressed as byte or character count for bencode HOT 3
- JSON to Bencode issues?
- collect2: error: ld returned 1 exit status HOT 2
- Explore more performant JSON libraries
- What happened to 0.0.8? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faq.