am1goo.Storm.Net 1.0.2

dotnet add package am1goo.Storm.Net --version 1.0.2
NuGet\Install-Package am1goo.Storm.Net -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="am1goo.Storm.Net" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add am1goo.Storm.Net --version 1.0.2
#r "nuget: am1goo.Storm.Net, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install am1goo.Storm.Net as a Cake Addin
#addin nuget:?package=am1goo.Storm.Net&version=1.0.2

// Install am1goo.Storm.Net as a Cake Tool
#tool nuget:?package=am1goo.Storm.Net&version=1.0.2

GitHub Issues or Pull Requests GitHub Issues or Pull Requests GitHub License

NuGet Version NuGet Downloads

Storm.Net

STORM (Strong Typed Object Referenced Model) - another way to make a deal with configuration files.
It's easy to use and give to you unlimited power to control every field or property in your file.

Why I made it?

I've worked in the video game industry at least 10 year and I've see how many errors was produced by a development team who works with JSON config files. Each error has chance to produce bugs and our most large time-eaters - tasks in trackers!
As you know, a lot of games used JSON format to declare game data and all of those files can be huge!
For example: GTA 5 game config has 63k items and 10mb size!
And I've decided that it could be easy to modify if it will have some tips like type definitions.

Syntax

Parameter key and his type shoud be separate by : colon symbol.
Value should be next after = equals sign.

  • Primitive and custom types, also enums: {param name}:{type} = {value}
  • Arrays: {array name} = [ .. any values between brackets .. ]
  • Objects: {object name} = { .. any properties between braces .. }

Built-in primitive types:

  • b - boolean
  • bt - byte
  • sbt - signed byte
  • s - short (int16)
  • us - unsigned short (uint16)
  • i - integer (int32)
  • ui - unsigned integer (uint32)
  • l - long (int64)
  • ul - unsigned long (uint64)
  • f - single aka float
  • d - double
  • dec - decimal
  • t - string
  • e - enum
  • url - path to external file

File association and format

.storm - is preferred extension for STORM files

#this is a comment

#b - means "boolean" and can be one of case-insensitives values 'yes' or '1' or 'tRuE' or 'no' or '0' or 'fAlSe'
param_1:b = yes

#i - means "integer"
param_2:i = -123

#f - means "float"
param_3:f = 32.32

#t - means "text" or "string"
param_4:t = this is a single line

param_5:t = "and this is a multi line
also called \"The King of Strings\".
It's not a joke!"

#objects should be mapped w/o any type
obj_1 = {
  field_1:t = "I'm a first field"
  field_2:s = 123
  field_3 = {
    arg_1:i = 123
    arg_2:sbt = 4
  }
}

#arrays should be mapped w/o any type as well
#also all array values can no have names
array_1 = [
  :t = "first element"
  :t =second element
  :t = "3rd element
in two lines"
]

#any inline objects should be mapped via type 'url'
obj = {
  internal:url = file:///home/user/internal.storm
  external:url = http://youhostname.domain/files/external.storm
}

Features

  • All types of primitive types
  • Enum deserialization from strings or numbers
  • Single-line and multi-line strings
  • Ability to inline any amount of inherit files (from local files or web servers)
  • Customization of deserialization process (you can add support to any your custom types!)

Installation

You can install NuGet package am1goo.Storm.Net into a .NET project.

  1. Open a command prompt and go to your's project folder
  2. Use the following command to install the Storm.Net package:
dotnet add package am1goo.Storm.Net
  1. After the command completes, open the .csproj file in Visual Studio to see the added NuGet package reference:
<ItemGroup>
  <PackageReference Include="am1goo.Storm.Net" Version="1.0.2" />
</ItemGroup>

Roadmap

  • Derialization from text or file
  • Serialization to text or file
  • Simplified serialization/deserialization of built-in C# collection types (List<T>, Queue<T>, HashSet<T> and Dictionary<KEY,VALUE>)

Example

using Storm;
using Storm.Serializers;

public class Example
{
  var settings = new StormSettings(StormSettings.Options.IgnoreCase, new List<IStormConverter>
  {
    new UrlStormConverter(), //added ability to load parts of data from other files
  });

  var serializer = new StormSerializer();
  var obj = await serializer.DeserializeFileAsync("Examples/test-file.storm", settings);
  /* do something with obj */
}

Requirements

  • Visual Studio 2019 or higher
  • .NET App 2.0 or higher
  • .NET Standard 2.1 or higher
  • .NET Core 5.0 and higher

Contribute

Contribution in any form is very welcome. Bugs, feature requests or feedback can be reported in form of Issues.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 is compatible.  netcoreapp2.1 is compatible.  netcoreapp2.2 is compatible.  netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.0

    • No dependencies.
  • .NETCoreApp 2.1

    • No dependencies.
  • .NETCoreApp 2.2

    • No dependencies.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 0 5/3/2024
1.0.1 72 4/22/2024
1.0.0 79 4/21/2024