ConseqConcatenation 1.0.5
dotnet add package ConseqConcatenation --version 1.0.5
NuGet\Install-Package ConseqConcatenation -Version 1.0.5
<PackageReference Include="ConseqConcatenation" Version="1.0.5" />
<PackageVersion Include="ConseqConcatenation" Version="1.0.5" />
<PackageReference Include="ConseqConcatenation" />
paket add ConseqConcatenation --version 1.0.5
#r "nuget: ConseqConcatenation, 1.0.5"
#:package ConseqConcatenation@1.0.5
#addin nuget:?package=ConseqConcatenation&version=1.0.5
#tool nuget:?package=ConseqConcatenation&version=1.0.5
ConseqConcatenation
ConseqConcatenation is a lightweight, reflection-based object serializer for .NET that converts objects into a compact, human-readable key-value text format and back.
It is designed for:
- Configuration-like structures
- Lightweight data persistence
- Debug-friendly serialization
- Human-editable structured text
This is not JSON and not XML. It is a minimal custom format optimized for clarity and simplicity.
Features
- Attribute-based field/property naming
- Inline and readable formatting modes
- Support for:
- Primitive types
stringdecimalboolGuidDateTimeTimeSpanEnum- Arrays
List<T>HashSet<T>Dictionary<TKey, TValue>
- Case-insensitive deserialization
- Nullable type support
- Reflection-driven member mapping
How to use
1. Define a Data Model
All serializable types must implement:
public interface IConseqData;
Example:
using ConseqConcatenation;
[ElementName("Example")]
[Comment("Example configuration object")]
public class Example : IConseqData
{
public int[] Numbers { get; set; }
public List<string> Names { get; set; }
public HashSet<Guid> Ids { get; set; }
public Dictionary<string, int> Map { get; set; }
public DateTime Created { get; set; }
public TimeSpan Duration { get; set; }
public decimal Price { get; set; }
public bool Enabled { get; set; }
}
2. Serialize
var example = new Example
{
Numbers = new[] { 1, 2, 3 },
Names = new List<string> { "Alice", "Bob" },
Enabled = true,
Price = 19.99m,
Created = DateTime.UtcNow
};
string text = example.Conqsequalize();
Console.WriteLine(text);
Example output:
[Example]
Numbers = 1;2;3
Names = Alice;Bob
Enabled = True
Price = 19.99
3. Deserialize
var restored = Conseq.Deconqsequalize<Example>(text);
Console.WriteLine(restored.Names[1]);
Formatting Modes
ConseqFormat.None
ConseqFormat.Compact
ConseqFormat.Readable
Attributes
ElementNameAttribute
Renames class, field, or property in serialized output.
[ElementName("User")]
public class User : IConseqData
{
[ElementName("login")]
public string Username { get; set; }
}
CommentAttribute
Adds human-readable comments (ignored during deserialization).
[Comment("Application configuration")]
public class Config : IConseqData
{
[Comment("Enable logging")]
public bool Logging { get; set; }
}
Supported Types
Primitives:
- int
- double
- decimal
- bool
- Guid
- DateTime
- TimeSpan
- Enum
Collections:
- Arrays (
T[]) List<T>HashSet<T>Dictionary<TKey, TValue>- Any generic collection with an
Addmethod
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.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.