AlienFruit.Otml.Configuration
1.2.7
dotnet add package AlienFruit.Otml.Configuration --version 1.2.7
NuGet\Install-Package AlienFruit.Otml.Configuration -Version 1.2.7
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.Configuration" Version="1.2.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AlienFruit.Otml.Configuration --version 1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AlienFruit.Otml.Configuration, 1.2.7"
#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.Configuration as a Cake Addin #addin nuget:?package=AlienFruit.Otml.Configuration&version=1.2.7 // Install AlienFruit.Otml.Configuration as a Cake Tool #tool nuget:?package=AlienFruit.Otml.Configuration&version=1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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
- AlienFruit.Otml (>= 1.2.7)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.