Antigrav 1.13.1
dotnet add package Antigrav --version 1.13.1
NuGet\Install-Package Antigrav -Version 1.13.1
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.13.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Antigrav" Version="1.13.1" />
<PackageReference Include="Antigrav" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Antigrav --version 1.13.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Antigrav, 1.13.1"
#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.
#:package Antigrav@1.13.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Antigrav&version=1.13.1
#tool nuget:?package=Antigrav&version=1.13.1
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 it's 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. Don't 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
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 | 193 | 12/25/2024 |
| 1.13.0 | 179 | 11/18/2024 |
| 1.12.6 | 184 | 10/12/2024 |
| 1.12.5 | 148 | 10/12/2024 |
| 1.12.4 | 167 | 10/9/2024 |
| 1.12.3 | 149 | 10/9/2024 |
| 1.12.2 | 155 | 10/9/2024 |
| 1.12.1 | 152 | 10/9/2024 |
| 1.12.0 | 159 | 10/3/2024 |
| 1.11.1 | 189 | 9/21/2024 |
| 1.11.0 | 163 | 9/8/2024 |
| 1.10.2 | 201 | 8/26/2024 |
| 1.10.1 | 161 | 8/26/2024 |
| 1.10.0 | 164 | 8/26/2024 |
| 1.9.0 | 199 | 8/24/2024 |
| 1.8.1 | 168 | 8/24/2024 |
| 1.8.0 | 191 | 8/24/2024 |
| 1.7.1 | 183 | 8/23/2024 |
| 1.7.0 | 186 | 8/23/2024 |
| 1.6.0 | 180 | 8/23/2024 |
| 1.5.1 | 216 | 8/23/2024 |
| 1.5.0 | 199 | 8/23/2024 |
| 1.4.0 | 212 | 8/22/2024 |
| 1.3.0 | 227 | 8/22/2024 |
| 1.2.1 | 190 | 8/21/2024 |
| 1.2.0 | 195 | 8/21/2024 |
| 1.1.1 | 190 | 8/21/2024 |
| 1.1.0 | 180 | 8/21/2024 |
| 1.0.0 | 175 | 8/20/2024 |