Antigrav 1.12.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Antigrav --version 1.12.5
NuGet\Install-Package Antigrav -Version 1.12.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="Antigrav" Version="1.12.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Antigrav --version 1.12.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Antigrav, 1.12.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 Antigrav as a Cake Addin #addin nuget:?package=Antigrav&version=1.12.5 // Install Antigrav as a Cake Tool #tool nuget:?package=Antigrav&version=1.12.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Antigrav
NuGet | Source
Serializing library based on JSON format, so its also easy to read format.
Types
- null
- string: specified in quotation marks (
""
) - bool: true or false
- integer: sbyte or byte or short or ushort or int or uint or long or ulong or Int128 or UInt128
- Enum: encoded as number values
- floating point number: float or double or decimal
- Complex
- Dictionary<,>: specified in curly brackets (
{}
). Objects are encoded as dictionaries - Arrays, ITuple, List<>: specified in square brackets (
[]
)
Note that if you encode any ICollection, but because of electric caterpillars you can decode only types that are listed here
Usage example
using Antigrav;
private enum Values {
Ace = 1,
Two = 2,
Three = 3,
Four = 4,
Five = 5,
Six = 6,
Seven = 7,
Eight = 8,
Nine = 9,
Ten = 10,
Jack = 11,
Queen = 12,
King = 13,
}
private enum Suits {
Diamonds,
Clubs,
Hearts,
Spades,
}
private class Card {
public Card() {
Value = null;
Suit = null;
}
public Card(Values value, Suits suit) {
Value = value;
Suit = suit;
}
[AntigravSerializable("value")] // warning, if you use fields then implement a set method.
public Values? Value { get; private set; }
[AntigravSerializable("suit")]
public Suits? Suit { get; private set; }
public override string ToString() => $"{Value} of {Suit}";
}
Card value = new(Values.Ace, Suits.Spades);
// encoding
string antigrav = AntigravConvert.DumpToString(value);
Console.WriteLine(antigrav); // "{\"value\": 1, \"suit\": 3}"
// decoding
Card decodedValue = AntigravConvert.LoadFromString<Card>(antigrav);
Console.WriteLine(decodedValue); // "Ace of Spades"
This was made as an experiment at first place, any tweaks in code are welcome. Dont ask why format is called so, the origin was extremely stupid
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.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.13.1 | 38 | 12/25/2024 |
1.13.0 | 93 | 11/18/2024 |
1.12.6 | 94 | 10/12/2024 |
1.12.5 | 88 | 10/12/2024 |
1.12.4 | 94 | 10/9/2024 |
1.12.3 | 81 | 10/9/2024 |
1.12.2 | 90 | 10/9/2024 |
1.12.1 | 91 | 10/9/2024 |
1.12.0 | 92 | 10/3/2024 |
1.11.1 | 101 | 9/21/2024 |
1.11.0 | 88 | 9/8/2024 |
1.10.2 | 115 | 8/26/2024 |
1.10.1 | 108 | 8/26/2024 |
1.10.0 | 111 | 8/26/2024 |
1.9.0 | 131 | 8/24/2024 |
1.8.1 | 125 | 8/24/2024 |
1.8.0 | 117 | 8/24/2024 |
1.7.1 | 129 | 8/23/2024 |
1.7.0 | 127 | 8/23/2024 |
1.6.0 | 125 | 8/23/2024 |
1.5.1 | 135 | 8/23/2024 |
1.5.0 | 128 | 8/23/2024 |
1.4.0 | 134 | 8/22/2024 |
1.3.0 | 144 | 8/22/2024 |
1.2.1 | 127 | 8/21/2024 |
1.2.0 | 134 | 8/21/2024 |
1.1.1 | 143 | 8/21/2024 |
1.1.0 | 128 | 8/21/2024 |
1.0.0 | 123 | 8/20/2024 |