Giter Site home page Giter Site logo

rickyah / ini-parser Goto Github PK

View Code? Open in Web Editor NEW
940.0 43.0 232.0 1.69 MB

Read/Write an INI file the easy way!

License: MIT License

C# 99.37% Shell 0.63%
c-sharp unity3d ini mono cli configuration config configuration-management configuration-file config-management

ini-parser's Introduction

INI File Parser

A .NET, Mono and Unity3d compatible(*) library for reading/writing INI data from IO streams, file streams, and strings written in C#.

Also implements merging operations, both for complete ini files, sections, or even just a subset of the keys contained by the files.

(*) This library is 100% .NET code and does not have any dependencies on Windows API calls in order to be portable.

Build Status

Get the latest version: https://github.com/rickyah/ini-parser/releases/latest Install it with NuGet: https://www.nuget.org/packages/ini-parser/

Version 2.0

Since the INI format isn't really a "standard", version 2 introduces a simpler way to customize INI parsing:

  • Pass a configuration object to an IniParser, specifying the behaviour of the parser. A default implementation is used if none is provided.

  • Derive from IniDataParser and override the fine-grained parsing methods.

Installation

The library is published to NuGet and can be installed on the command-line from the directory containing your solution.

> nuget install ini-parser

Or, from the Package Manager Console in Visual Studio

PM> Install-Package ini-parser

If you are using Visual Studio, you can download the NuGet Package Manager extension that will allow adding the NuGet dependency for your project.

If you use MonoDevelop / Xamarin Studio, you can install the MonoDevelop NuGet AddIn to also be able to add this library as dependency from the IDE.

Getting Started

All code examples expect the following using clauses:

using IniParser;
using IniParser.Model;

INI data is stored in nested dictionaries, so accessing the value associated to a key in a section is straightforward. Load the data using one of the provided methods.

var parser = new FileIniDataParser();
IniData data = parser.ReadFile("Configuration.ini");

Retrieve the value for a key inside of a named section. Values are always retrieved as strings.

string useFullScreenStr = data["UI"]["fullscreen"];
// useFullScreenStr contains "true"
bool useFullScreen = bool.Parse(useFullScreenStr);

Modify the value in the dictionary, not the value retrieved, and save to a new file or overwrite.

data["UI"]["fullscreen"] = "true";
parser.WriteFile("Configuration.ini", data);

Head to the wiki for more usage examples, or check out the code of the example project

Merging ini files

Merging ini files is a one-method operation:

   var parser = new IniParser.Parser.IniDataParser();

   IniData config = parser.Parse(File.ReadAllText("global_config.ini"));
   IniData user_config = parser.Parse(File.ReadAllText("user_config.ini"));
   config.Merge(user_config);

   // config now contains that data from both ini files, and the values of
   // the keys and sections are overwritten with the values of the keys and
   // sections that also existed in the user config file

Keep in mind that you can merge individual sections if you like:

config["user_settings"].Merge(user_config["user_settings"]);

Comments

The library allows modifying the comments from an ini file. However note than writing the file back to disk, the comments will be rearranged so comments are written before the element they refer to.

To query, add or remove comments, access the property Comments available both in SectionData and KeyData models.

var listOfCommentsForSection = config.["user_settings"].Comments;
var listOfCommentsForKey = config["user_settings"].GetKeyData("resolution").Comments;

Unity3D

You can easily use this library in your Unity3D projects. Just drop either the code or the DLL inside your project's Assets folder and you're ready to go!

ini-parser is actually being used in ProjectPrefs a free add-on available in the Unity Assets Store that allows you to set custom preferences for your project. I'm not affiliated with this project: Kudos to Garrafote for making this add-on.

Contributing

Do you have an idea to improve this library, or did you happen to run into a bug? Please share your idea or the bug you found in the issues page, or even better: feel free to fork and contribute to this project with a Pull Request.

ini-parser's People

Contributors

anthonymastrean avatar bastianeicher avatar caverna avatar davidgrupp avatar gtijdeman avatar hagish avatar kzgs avatar mbcrawfo avatar nothing4you avatar rickyah avatar seveves avatar shuebener avatar stoyandimov avatar xtu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ini-parser's Issues

sections with same name

Original author: [email protected] (September 25, 2011 12:54:31)

What steps will reproduce the problem?

  1. Open an ini files with section like [123_1][123_2] with the same name.
    2.
    3.

What is the expected output? What do you see instead?

The program just crash because can't handle 2 sections with the same name.

What version of the product are you using? On what operating system?

1.7 on windows 7

Please provide any additional information below.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=15

Duplicate key names not permitted in section, as required/used by Windows INF Files

Original author: [email protected] (February 27, 2012 00:41:10)

What steps will reproduce the problem?

  1. IniData parsedData = parser.LoadFile("some_inf_file.inf");

What is the expected output? What do you see instead?

Microsoft Windows driver installation .INF files often have duplicate key names in a section. For example:

[Foo_Inst]
CopyFiles=Entry1CopyFiles
CopyFiles=Entry2CopyFiles

What version of the product are you using? On what operating system?

1.7.1 patched with Issue 20 fixes.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=26

Having section names with white-space causes parsing error

Original author: [email protected] (February 20, 2012 17:14:14)

What steps will reproduce the problem?

  1. Load an INI file with white-space in a section name.

What is the expected output? What do you see instead?
I expect that the parser can handle white-space in sections since they are fully escaped.

What version of the product are you using? On what operating system?
Latest download.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=20

Value parsing

How can I parse value that is written in the following way:
(I get only SET because the rest of the string is interpreted as a comment)

TurnMachine = "SET;H 500;1"

ini-parser v2.1.0 NuGet package is broken

The NuGet package for ini-parser v2.1.0 is incorrect and nothing gets installed after installing this NuGet package.

  • LICENSE should be in a 'content' folder
  • README.md should be a plaintext file (since VS won't highlight GitHub markdown) and placed in the root directory
  • INIFileParser.dll and .pdb should be in a 'lib' folder. And preferably in another folder that targets the .NET framework you used in this library (for example, if this library targets .NET 4.0 then the .dll and .pdb should be in \lib\net40)

Attached image shows a .nupkg that installs correctly.
untitled

Multiple comment character types in the one config

Original author: [email protected] (February 23, 2012 09:37:16)

What steps will reproduce the problem?

  1. Unable to specify more than one comment character to load an ini file. Eg. both '#', and '!'

What is the expected output? What do you see instead?
Ability to specify more than 1 comment character.

What version of the product are you using? On what operating system?
1.7.1.0

Please provide any additional information below.
This issue is part of a series to provide similar behavior as Win32 API's GetPrivateProfileString function. (See the full list of tasks in first comment of Issue 20)

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=22

CommentChar doesn't allow for multi-character comment delimiters

I've come across an INI with C++ style single-line comments, like this:

// This is a comment

Yes it appears ini-parser doesn't have a simple way of dealing with this.

If CommentChar was CommentString (or even CommentStrings) this would be trivial. I imagine implementation would look something like:

config.CommentStrings = new string[] {"//", "#"};

Problems mit special caracters: äöüéà...

Original author: [email protected] (December 27, 2011 14:14:22)

What steps will reproduce the problem?

  1. Create an ini file from the sample below.
  2. Read the file with your library

What is the expected output? What do you see instead?
If I have an ini file showing an ä in the editor I expect to read än ä with the library too.
eg. "Identität" changes to "Identit�t"

What version of the product are you using? On what operating system?
1.7.1.0

Please provide any additional information below.
Sample ini file content:
[Test]
English=Identity
German=Identität
French=Identité

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=18

With multi type comment characters, the comment character should be preserved.

Original author: [email protected] (February 23, 2012 13:04:28)

What steps will reproduce the problem?

  1. Read the following Ini config with CommentCharacters = "#!;"

comment A

!comment B
[section1]

comment A

;comment B
key1 = testvalue
2. Write the ini data

What is the expected output? What do you see instead?
Comment characters '!' and ';' should be preserved., but instead only '#' was used even for 'comment B'

What version of the product are you using? On what operating system?
1.7.1.0

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=25

Parsing ini-file with curly brackets in section name fails

Original author: [email protected] (December 16, 2011 12:57:27)

What steps will reproduce the problem?

  1. Take the provided INI-File
  2. Try the first steps from the Usage-Section in the wiki

What is the expected output? What do you see instead?
Expected output is the content of the ini-file, instead this happens :

IniParser.ParsingException: Parsing error: Couldn't parse string: [{E3729302-74D1-11D3-B43A-00AA00CAD128}]. Unknown file format. ---> IniParser.ParsingException: Couldn't parse string: [{E3729302-74D1-11D3-B43A-00AA00CAD128}]. Unknown file format.

What version of the product are you using? On what operating system?
Windows 7 / Ini File Parser v 1.7

Please provide any additional information below.
The INI is generated by InstallShield.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=17

Case insensitive Section and Key names

Original author: [email protected] (February 23, 2012 09:34:12)

What steps will reproduce the problem?

  1. Load an Ini file with [section1]\nkey1 = val1
  2. Read the parameter with iniData["SECTION1"]["KEY1"]
  3. Null exception is raised as SECTION1 is not found.

What is the expected output? What do you see instead?
val1 read as it would have been done if iniData["section1"]["nkey1"] was specified.

What version of the product are you using? On what operating system?
1.7.1.0

Please provide any additional information below.
This should be driven by a mode, and case sensitivity should remain for backwards compatibility.

This issue is part of a series to provide similar behavior as Win32 API's GetPrivateProfileString function. (See the full list of tasks in first comment of Issue 20)

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=21

Unreachable code in StreamIniDataParser.cs

Original author: [email protected] (July 21, 2011 23:58:39)

The MatchKeyValuePair() looks like this:

    private bool MatchKeyValuePair(string s)
    {
        if (string.IsNullOrEmpty(s))
            return false;

        return s.Contains("=");
        return _keyValuePairRegex.Match(s).Success;
    }

Before 1.7, the second return statement was used. Since 1.7, a simpler check is used (the first return). In any case, one or the other should be removed.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=13

Arabic RTL value spoil keys

Original author: [email protected] (June 28, 2011 10:44:48)

What steps will reproduce the problem?

  1. IRFANVIEW.EXE .ini file (i_view32.ini),sect [BatchText] key "AddText"
  2. changed value to بنتي والذئاب
  3. following key spoiled, "TextCoord" had a value of "100;1;300;51;" it turn to "100" and the missing part of the string is moved upward in between the two keys. Luckily it starts with ';' so it does not break rules.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
v1.7

Please provide any additional information below.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=11

Comments not stored in keys

Original author: [email protected] (November 03, 2009 15:32:57)

Using the following code to add a new key with comments:

KeyData key = new KeyData("TestKey");
key.Value = "TestValue";
key.Comments.Add("This is a comment");
inidata["TestSection"].SetKeyData(key);

Looking through the inidata-structures show that the key exists and the
value is correctly set, but the comments collection is empty.

Checked the source code and found this for SetKeyData:

    public void SetKeyData(KeyData data)
    {
        if (data != null)
        {
            if (_keyData.ContainsKey(data.KeyName))
                RemoveKey(data.KeyName);

            AddKey(data.KeyName, data.Value);
        }
    }

Compared to SetSectionData:

    public void SetSectionData( string sectionName, SectionData data)
    {
        if ( data != null )
            _sectionData[sectionName] = data;
    }

SetKeyData only saves the key name and value.

Perhaps store the KeyData-object directly to the collection like is done
with the SectionData or add another method of storing comments to keys?

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=5

Spaces in sections

Original author: [email protected] (February 03, 2012 07:00:27)

What steps will reproduce the problem?

  1. Use a section name called Web Collaboration
    2.
    3.

What is the expected output? What do you see instead?
The restriction stated is that
"Sections are declared as a unique word enclosed in square brackets. Spaces enclosed into the square bracktes are ignored, but the section must be defined with an unique word( sampleSection )"
It does not say that the section names cannot have spaces in them. You have an assertion

if ( !Assert.StringHasNoBlankSpaces(keyName) )

which is causing problems. The comment in your method xxx says
"A valid section name is a string with NO blank spaces"
So I think that either spaces should be allowed (mixed in with words) the documentation should say unique word (containing no spaces). I know it says unique word, but with no spaces would be clearer.

(I think spaces should be allowed).

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=19

Compatiable with Chinese character

Original author: [email protected] (December 07, 2011 08:10:26)

What steps will reproduce the problem?
If the ini file includes sections or keys written with Chinese characters, it cannot parse the file.

What is the expected output? What do you see instead?
Add international support please.

What version of the product are you using? On what operating system?
ver 1.7, on windows 7

Please provide any additional information below.
Please reach me if you interested.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=16

Removing All Keys Without Removing Section

Original author: [email protected] (September 28, 2012 13:27:06)

One thing I can't see a way to do is to remove all keys in a section without removing the section itself.

I tried the following, using a foreach as recommended, but Visual Studio doesn't seem to like it.

foreach (KeyData key in parsedData.Sections["TABS"]) {
    parsedData["TABS"].RemoveKey(key.KeyName);
}

It throws

System.InvalidOperationException was unhandled
  Message=Collection was modified; enumeration operation may not execute.

Is there a way to do this already that I'm missing? If not, I'd like to throw this in as a feature request.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=29

Allow ODBC connection strings to be parsed from INI files.

Original author: [email protected] (December 27, 2010 18:00:34)

What steps will reproduce the problem?

  1. Add a connection string to an INI file and attempt to parse; Example:
    connectionString = Server=sqlserver.domain.com;Database=main;User ID=user;Password=password

What is the expected output?
iniData["connectionString"] should yield the string "Server=sqlserver.domain.com;Database=main;User ID=user;Password=password".

What do you see instead?
Only the first part of the value, up until the first semicolon, ("Server=sqlserver.domain.com") is returned because it treats each semicolon in the line as the start of a comment.

What version of the product are you using? On what operating system?
INIFileParser.dll version 1.5.5.0
Visual Studio 2010
Windows 7

Please provide any additional information below.

The INI file article on Wikipedia (http://en.wikipedia.org/wiki/Ini_file) gives some possible solutions, including support for quoted values (surrounding them with double quotes) and escape values. (use ';' for a semicolon in a value) Any of the solutions there would be acceptable, as long as it allowed SQL connection strings to be loaded and saved correctly.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=9

Clear comments on merge

Hi,

I'm merging 2 files with a common part. Comments are duplicated. I assume it's not easy to remove duplicate.

But how can I remove all comments of an InitData ?

    foreach (var section in conf.Sections) {
      section.LeadingComments.Clear();
      section.TrailingComments.Clear();
    }
    Config.Merge(conf); // merge with master

This code seems to clear all comments of section but while writing Config to a file I still see comments :-/

According to source code I can't see where arrays are duplicated. Any Idea ?

Let relaxed mode skip un parsable lines

Original author: [email protected] (February 23, 2012 10:06:02)

What steps will reproduce the problem?

  1. Set the Relaxed ini format mode to true
  2. Load ini data with 'win]' on a line. In this case the section is missing the '['
  3. Loading throws ParsingException

What is the expected output? What do you see instead?
the line 'win]' is ignored and any parameters below are treated as part if the previous seciton. This is the same behaviour as GetPrivateProfileString(..) in the Win32 API

What version of the product are you using? On what operating system?
1.7.1.0

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=24

Issue with section.Key

I might be doing something incorrect here, but I had issues when trying to look through all of the individual keys in the individual section.

IniData parsedData = fileIniData.ReadFile(file);
SectionDataCollection sections = new SectionDataCollection();
SectionDataCollection saved_sections new SectionDataCollection()
foreach (SectionData section in parsedData.Sections)
{
     if (section.SectionName.Contains("some_text"))
          sections.AddSection(section.SectionName);
}

foreach(SectionData section in sections)
{
     foreach (KeyData key in section.Keys)
     {
          if (sections.ContainsSection(key.Value) == false)
               saved_sections.AddSection(key.Value);
      }
}

However, key.Count above was always 0. I would expect it to have all of the keys already. The way around it for me at least was to add a line to call GetSectionData to actually get all of the keys.

foreach(SectionData section in sections)
{
     SectionData section_data = parsedData.Sections.GetSectionData(section.SectionName);
     foreach (KeyData key in section_data.Keys)
     {
          if (sections.ContainsSection(key.Value) == false)
              saved_sections.AddSection(key.Value);
      }
}

Is this the way the library was designed? Seems less than ideal, but still works. Thanks for the library made my life a lot easier.

Support for duplicate keys in a section

The particular ini files have certain sections where there are duplicate keys. I understand that is not standard for ini files, but the ones I am working with allow duplicate keys.

[__global__section__] is written for a file marked with RelaxedIniFormat

Original author: [email protected] (February 23, 2012 09:43:22)

What steps will reproduce the problem?

  1. Load Ini file with the RelaxedIniFormat set to true.
  2. Call WriteData(..)
  3. Observe written data.

What is the expected output? What do you see instead?
The same ini configuration written as it was read

What version of the product are you using? On what operating system?
1.7.1.0

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=23

Please apply the relaxed format to VSS ss.ini files ?

Original author: [email protected] (September 07, 2010 12:52:35)

What steps will reproduce the problem?

  1. Use an user named ss.ini file
    2.
    3.

What is the expected output?
For the relaxed override to allow the code to load the sections

What do you see instead?
An exception stating that the first line that it isn't a comment throwing an ParsingException

What version of the product are you using?
1.5.5
On what operating system?
XPSP3 and Win 7

Please provide any additional information below.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=8

Values with comment delimiter are parsed as partial comments.

Original author: [email protected] (October 03, 2012 18:16:56)

What steps will reproduce the problem?

Create a test INI file with the following content:

[section]
key=value1;value2

What is the expected output? What do you see instead?

Was expecting data["section"]["key"] to be "value1;value2"

instead ";value2" is parsed as a comment.

What version of the product are you using? On what operating system?

Please provide any additional information below.

I was able to modify "StreamIniDataParser.cs", line 162:

FROM:

 _commentRegex = new Regex(value + strCommentRegex);

TO:

 _commentRegex = new Regex("^" + value + strCommentRegex);

to make sure the a only comment delimiter appearing in front of a line is matched as a comment delimiter.

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=30

Wrong working .AddKey(a, b)

Original author: aion.cat (July 20, 2010 13:38:19)

Greetings. During the tests found that the method .AddKey(name,value) works by adding sections are not as described in the wiki. For example, using the syntax

newData.Sections.AddSection("newSection");
newData["newSection"].AddKey("newKey1", "value1");

I got only

[newSection]
value1 =

Desired result has turned to a division of adding the key and assigning it a value:

newData.Sections.AddSection("newSection");
newData["newSection"].AddKey("newKey1");
newdata["newSection"]["newKey1"] = "value1";

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=7

Preserve the API compatibility to avoid the need of a major version number update

In commit 726b46a made some breaking changes with API that need to be fixed before releasing 2.0.4

  • Keep the IIniDataFormatter interface and default implementation. That way an IniData file that was read with a configuration can be converted to an string with another configuration, allowing the user to convert an ini file between formats.
  • Put back the IniData.Configuration property and use that configuration by default in IniData.ToString() to keep the backward compatibility: IniData read with a configuration is converted to an string with the same configuration using the ToString() method. Currently ToString() always uses the DefaultIniDataFormatterwith a default configuration when writing to a string and not the Configuration used to read the ini file!

Some characters are not supported when reading section names

Original author: [email protected] (May 10, 2011 07:41:49)

What steps will reproduce the problem?

  1. Create section "http://example.com/page"
  2. Try to read it
  3. Exception raised

What is the expected output? What do you see instead?

Reading the value should read

What version of the product are you using? On what operating system?

Latest trunk, Windows 7, Visual Studio 2010, C# 4

Please provide any additional information below.

Patch attached, it's just a matter of adding a few more characters to the regexp

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=10

Loading ini fails when backslashes are present in section

Original author: [email protected] (March 16, 2012 23:19:00)

What steps will reproduce the problem?
Loading a following ini file:

[Sessions\[email protected]]
HostName=ftp.scene.org
PortNumber=21
UserName=anonymous
FSProtocol=5

What is the expected output? What do you see instead?

IniParser.ParsingException was unhandled
  Message=Parsing error: Couldn't parse string: [Sessions\anonymous@ftp.scene.org]. Unknown file format.
  Source=INIFileParser
  StackTrace:
       at IniParser.StreamIniDataParser.ReadData(StreamReader reader, Boolean relaxedIniFormat)
       at IniParser.FileIniDataParser.LoadFile(String fileName, Boolean relaxedIniRead)
       at Uploader.Uploader.Main(String[] args) in D:\Programming\uploader2\uploader2\Uploader.cs:line 39
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: IniParser.ParsingException
       Message=Couldn't parse string: [Sessions\anonymous@ftp.scene.org]. Unknown file format.
       Source=INIFileParser
       StackTrace:
            at IniParser.StreamIniDataParser.ProcessLine(String currentLine)
            at IniParser.StreamIniDataParser.ReadData(StreamReader reader, Boolean relaxedIniFormat)
       InnerException: 

What version of the product are you using? On what operating system?
1.7.1.0

Please provide any additional information below.
Does not work even with relaxed mode

Original issue: http://code.google.com/p/ini-parser/issues/detail?id=27

Same line comments

Right now comments in the same line like this:
key1 = value ; this is an important configuration setting
are not parsed as comment, but as part of the value (i.e. the value for key key1 is value ; this is an important configuration setting)

The library also need some way to preserve those kind of "same line comments" so they are persisted correctly if we convert the IniData back to a string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.