MSBuild.CompactJsonResources
1.0.1-preview1
This is a prerelease version of MSBuild.CompactJsonResources.
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 MSBuild.CompactJsonResources --version 1.0.1-preview1
NuGet\Install-Package MSBuild.CompactJsonResources -Version 1.0.1-preview1
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="MSBuild.CompactJsonResources" Version="1.0.1-preview1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MSBuild.CompactJsonResources --version 1.0.1-preview1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MSBuild.CompactJsonResources, 1.0.1-preview1"
#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 MSBuild.CompactJsonResources as a Cake Addin #addin nuget:?package=MSBuild.CompactJsonResources&version=1.0.1-preview1&prerelease // Install MSBuild.CompactJsonResources as a Cake Tool #tool nuget:?package=MSBuild.CompactJsonResources&version=1.0.1-preview1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MSBuild.CompactJsonResources
Often, Json files are added to a project as one line to reduce the size of the build. Such files are uncomfortable to read and track changes through version control systems. This package resolve this problem by removing whitespaces, trailing commas and comments from the builds without changing the beautiful Json source files by adding their single-line copies.
{
"null": null, //this is comment
"number": 123,
"object": {
"a": "b",
"c": "d",
},
"string": "Hello World",
}
{"null":null,"number":123,"object":{"a":"b","c":"d"},"string":"Hello World"}
Getting started
- Add reference for this package.
- Set
EnableCompactJson
property totrue
. (When the value isfalse
the files data are not changed) - Just use
JsonEmbeddedResource
asEmbeddedResource
.
<PropertyGroup>
<EnableCompactJson>true</EnableCompactJson>
</PropertyGroup>
<ItemGroup>
<JsonEmbeddedResource Include="data.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MSBuild.CompactJsonResources" Version="1.0.0" PrivateAssets="all"/>
</ItemGroup>
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- 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.0.2 | 499 | 1/21/2022 |
1.0.2-preview2 | 254 | 1/21/2022 |
1.0.2-preview | 246 | 12/19/2021 |
1.0.1 | 486 | 10/23/2021 |
1.0.1-preview1 | 259 | 10/21/2021 |
1.0.0 | 325 | 9/7/2021 |
1.0.0-preview2 | 248 | 8/27/2021 |
1.0.0-preview1 | 200 | 8/25/2021 |