JSS is a simple storing system library that's easy to use and has a good performance/file size ratio. It's written in C# .NET.
Jump to: Features | How it works | Documentation | Downloads
Convert
for ints, etc. You can easily fix that, only ReadInt()
and ReadByte()
are affected)value,value,value
- After an ,
comes a value. In code called SPLIT_CHAR
:
indicates an "iteration": It indicates that a new form of data is stored. You can view it like a block. In the block, there could be other blocks. And so on. Pure for user readability, replaces a few ,
. In code called ITERATION_CHAR
value,"string/char value"value
- "
is a character to mark it's a string or character, it's placed at the beginning and the end of the string/character. After a string value, the ,
is ignored, to save space. In code called EXCEPTION_CHAR
"\"",value,"\\"
- The \
is an "escape character". It tells the interpeter that it should ignore the character next to it and read it no matter what value it is. That's necessary for a string if you put in "
, because the interpeter will think it's the end of the string. Placing a \
in front of it will tell the interpeter to ignore it and just store it. This is also necessary for a \
, because that character would otherwise be ignored. In code called MARK_CHAR
:1,"Peter"50:2,"James"30:3,"Fred"4
This documentation is barebones, so I recommend just to look at StoringSystem.cs. These are all public methods, void if no other type is given.
StoringSystem.WritingSystem
NextIteration()
- Adds another iteration, that's useful for the user to see where things are and how the file is constructed. Not required.Add(object|string|bool val)
- Adds a value to the contentAddString(string word)
- Adds a string in quotes, so it cannot collide with the config format. Usefull to store words and phrases, not for values like integers.AddChar(char c)
- Does the same as AddString(word)
, but then with a char.WriteToFile(string path)
- Writes the content to the specified filepath.StoringSystem.ReadingSystem
string Read()
- Reads the next variable and passes it to you. Works also for strings. For specified things, like an int, use ReadInt()
. Those are available for int, char, bool and byte.bool ReadFromFile(string path)
- Reads from the specified filepath. You can also pass in the path in constructor, than it'll automatically call it for you. Required for Read()
. Returns true on sucessfull load.