AlienFruit.Otml 1.2.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package AlienFruit.Otml --version 1.2.5                
NuGet\Install-Package AlienFruit.Otml -Version 1.2.5                
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="AlienFruit.Otml" Version="1.2.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AlienFruit.Otml --version 1.2.5                
#r "nuget: AlienFruit.Otml, 1.2.5"                
#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 AlienFruit.Otml as a Cake Addin
#addin nuget:?package=AlienFruit.Otml&version=1.2.5

// Install AlienFruit.Otml as a Cake Tool
#tool nuget:?package=AlienFruit.Otml&version=1.2.5                

Logo

OTML is an object tree model language. It is a language that describes a tree of objects, which is easily readable by both man and machine. It is abstract, flexible and simple, there is no data standardization and no arrays in it. OTML supports comments and stream processing. <br/><br/>

OTML targets

  • To be easily understandable to a man
  • To be minimalistic: have a syntax consisting of a minimum set of rules
  • To be as abstract and flexible as possible, allowing to describe as many different data structures as possible
  • To support data stream processing
  • To develop and change easily, have a version system
  • Forget about it: {}, this: [] and this: () <br/>

OTML example:

@FooObject
	TemplateId : 252
	Amount : 226
	Comments : 
		string129
		string93
		string190
	CrDate : "2020-03-29T16:04:35.4042938"
	Deleted : True
	DistributorId : 191
	BusinessStatusId : 253
	IsEditOut : False
	OpDate : "2020-08-22T08:31:25.9223099"
	Outercode : Outercodestring48
	PDADocNum : 51
	Values : 
		@ItemValue
			AnswerDate : "2017-08-21T10:32:51.6801390"
			AnswerNumber : 15
			AnswerStr : AnswerStrstring229
			Id : 30
		@ItemValue
			AnswerDate : "2017-12-17T04:07:10.4458521"
			AnswerNumber : 178
			AnswerStr : AnswerStrstring69
			Id : 225
		@ItemValue
			AnswerDate : "2017-09-20T03:52:18.1241429"
			AnswerNumber : 222
			AnswerStr : AnswerStrstring145
			Id : 204
	MultilineStringValue : 
		"When an outburst occurs from gas very near the black hole," +
		"the ejected gas collides with material flowing away from the massive stars in winds," +
		"pushing this material backwards and causing it to glow in X-rays." +
		"When the outburst dies down the winds return to normal and the X-rays fade."

Serialization

The next class will be used in examples:

public class Foo
{
	public string Name { get; set; }
	public string StringValue { get; set; }
	public int IntValue { get; set; }
}

Serialization to string:

var fooClass = new Foo
{
	Name = "Name",
	StringValue =  "Value",
	IntValue = 123
};

var serializer = OtmlSerializer.Create();

string result = serializer.Serialize(fooClass);

Serialization to Stream:

var fooClass = new Foo
{
	Name = "Name",
	StringValue =  "Value",
	IntValue = 123
};

var serializer = OtmlSerializer.Create();

using (var stream = File.OpenWrite("C:\\result.otml"))
{
	serializer.Serialize(fooClass, stream);
}

Deserialization

Deserialization from string:

var serializer = OtmlSerializer.Create();

var source =
	"@Foo\n" +
	"\tName: Name\n" +
	"\tStringValue : Value\n" +
	"\tIntValue : 123";

Foo result = serializer.Deserialize<Foo>(source);

Deserialization from Stream:

var source =
	"@Foo\n" +
	"\tName: Name\n" +
	"\tStringValue : Value\n" +
	"\tIntValue : 123";

using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(source)))
{
	Foo result = serializer.Deserialize<Foo>(stream);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.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.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on AlienFruit.Otml:

Package Downloads
AlienFruit.Otml.Serializer

OTML is an object tree model language. It is a language that describes a tree of objects, which is easily readable by both man and machine. It is abstract, flexible and simple, there is no data standardization and no arrays in it. OTML supports comments and stream processing.

AlienFruit.FluentConsole.AsciiArt

Draw ascii pictures in a console from OTML files.

AlienFruit.Otml.Configuration

This library allows using an otml configuration file instead of the standard appsettings.json

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.7 132 11/4/2024
1.2.6 44 10/3/2024
1.2.5 172 8/30/2024
1.2.4 45 8/29/2024
1.2.2 325 11/14/2023
1.2.1 116 8/8/2023
1.2.0 819 8/13/2020
1.1.1 760 12/20/2019
1.1.0 5,448 11/28/2019
1.0.8 839 4/9/2019
1.0.7 863 2/17/2019
1.0.6 917 12/6/2018
1.0.5 880 12/6/2018
1.0.4 904 12/4/2018
1.0.3 931 11/30/2018
1.0.2 906 11/20/2018
1.0.2-alpha0001 694 11/20/2018
1.0.0 941 11/13/2018