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.
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                
#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                

MSBuild.CompactJsonResources

header

NuGet Badge license fuget.org

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

  1. Add reference for this package.
  2. Set EnableCompactJson property to true. (When the value is false the files data are not changed)
  3. Just use JsonEmbeddedResource as EmbeddedResource.
<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 504 1/21/2022
1.0.2-preview2 257 1/21/2022
1.0.2-preview 249 12/19/2021
1.0.1 491 10/23/2021
1.0.1-preview1 262 10/21/2021
1.0.0 330 9/7/2021
1.0.0-preview2 251 8/27/2021
1.0.0-preview1 203 8/25/2021