All Projects → ThiagoBarradas → Jsonmasking

ThiagoBarradas / Jsonmasking

Licence: mit
Replace fields in json, replacing by something, don't care if property is in depth objects. Very useful to replace passwords credit card number, etc.

Projects that are alternatives of or similar to Jsonmasking

Tweetinvi
Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
Stars: ✭ 812 (+754.74%)
Mutual labels:  dotnet-standard, dotnet-core
Jsonapi
[Bolt Extension] JSON API for Bolt CMS
Stars: ✭ 55 (-42.11%)
Mutual labels:  json, extension
Geneticsharp
GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).
Stars: ✭ 813 (+755.79%)
Mutual labels:  dotnet-standard, dotnet-core
Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (+556.84%)
Mutual labels:  dotnet-standard, dotnet-core
Reswplus
Unleash your resw files with this Visual Studio extension: auto generation of strongly typed static properties, support of pluralization, strongly typed string formatting, etc...
Stars: ✭ 77 (-18.95%)
Mutual labels:  dotnet-standard, dotnet-core
Featuretoggle
Simple, reliable feature toggles in .NET
Stars: ✭ 641 (+574.74%)
Mutual labels:  dotnet-standard, dotnet-core
Jj
JSON Stream Editor (command line utility)
Stars: ✭ 1,033 (+987.37%)
Mutual labels:  utility, json
Refit
The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
Stars: ✭ 5,545 (+5736.84%)
Mutual labels:  json, dotnet-core
Minion
Background job system for .NET applications
Stars: ✭ 94 (-1.05%)
Mutual labels:  dotnet-standard, dotnet-core
Poke
A powerful reflection module for powershell.
Stars: ✭ 66 (-30.53%)
Mutual labels:  utility, dotnet-core
Steeltoe
Steeltoe .NET Core Components: CircuitBreaker, Configuration, Connectors, Discovery, Logging, Management, and Security
Stars: ✭ 612 (+544.21%)
Mutual labels:  dotnet-standard, dotnet-core
Piranha.core
Piranha CMS is the friendly editor-focused CMS for .NET Core that can be used both as an integrated CMS or as a headless API.
Stars: ✭ 1,242 (+1207.37%)
Mutual labels:  dotnet-standard, dotnet-core
Dnsserver
Technitium DNS Server
Stars: ✭ 603 (+534.74%)
Mutual labels:  dotnet-standard, dotnet-core
Electron.net
Build cross platform desktop apps with ASP.NET Core (Razor Pages, MVC, Blazor).
Stars: ✭ 6,074 (+6293.68%)
Mutual labels:  dotnet-standard, dotnet-core
Dotnet Webassembly
Create, read, modify, write and execute WebAssembly (WASM) files from .NET-based applications.
Stars: ✭ 535 (+463.16%)
Mutual labels:  dotnet-standard, dotnet-core
Sendgrid Csharp
The Official Twilio SendGrid Led, Community Driven C#, .NetStandard, .NetCore API Library
Stars: ✭ 835 (+778.95%)
Mutual labels:  dotnet-standard, dotnet-core
Dotnet Win32 Service
Helper classes to set up and run as windows services directly on .net core. A ServiceBase alternative.
Stars: ✭ 425 (+347.37%)
Mutual labels:  dotnet-standard, dotnet-core
Netfabric.hyperlinq
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Stars: ✭ 479 (+404.21%)
Mutual labels:  dotnet-standard, dotnet-core
File Extension List
Organised collection of common file extensions
Stars: ✭ 63 (-33.68%)
Mutual labels:  json, extension
Teamcity Dotnet Plugin
TeamCity plugin for .NET Core projects
Stars: ✭ 77 (-18.95%)
Mutual labels:  dotnet-standard, dotnet-core

Build Status Quality Gate Status Coverage NuGet Downloads NuGet Version

Json Masking

Replace fields in json, replacing by something, don't care if property is in depth objects. Very useful to replace passwords, credit card number, etc.

This library matching insensitive values with field namespaces. You can use wildcard * to allow any char in pattern;

Sample

var example = new 
{
	SomeValue = "Demo",
	Password = "SomePasswordHere",
	DepthObject = new 
	{
		Password = "SomePasswordHere2",
		Card = new 
		{
			Number = "555500022223333"
		}
	},
	CreditCardNumber = "5555000011112222",
	Card = new 
	{
		Number = "555500022223333"
	}
};

var exampleAsString = JsonConvert.Serialize(example); // value must be a json string to masked

// note that password is only replaced when is in root path
var blacklist = new string[] { "password", "card.number", "*.card.number" "creditcardnumber" };
var mask = "******";

var maskedExampleAsString = exampleAsString.MaskFields(blacklist, mask);

Console.WriteLine(maskedExampleAsString);

Output

{
	"SomeValue" : "Demo",
	"Password" : "******",
	"DepthObject" : {
		"Password" : "SomePasswordHere2",
		"Card" : {
			"Number" : "******"
		}
	},
	"CreditCardNumber" : "******",
	"Card" : {
		"Number" : "******"
	}
}

Install via NuGet

PM> Install-Package JsonMasking

How can I contribute?

Please, refer to CONTRIBUTING

Found something strange or need a new feature?

Open a new Issue following our issue template ISSUE_TEMPLATE

Changelog

See in nuget version history

Did you like it? Please, make a donate :)

if you liked this project, please make a contribution and help to keep this and other initiatives, send me some Satochis.

BTC Wallet: 1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX

1G535x1rYdMo9CNdTGK3eG6XJddBHdaqfX

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].