JSanitizer NuGet Library

Joever Monceda
2 min readOct 15, 2020

Configurable sanitizer for XML and JSON string value through extension method.

NuGet: https://www.nuget.org/packages/JSanitizer/

Features:

1. Default sanitizer to replace password value
2. Sanitize with options

Requirements:

  1. .NET Core 3.1
  2. Visual Studio or VS Code

How to use:

  1. Go to Tools and select Manage Nuget Packages and Search for JSanitizer library.
  2. OR Install-Package JSanitizer -Version 3.0.1

Extension:

  1. {json string value}.SanitizeJsonValue(configPath)
  2. {xml string value}.SanitizeXmlValue(configPath)
  3. {xml string value}.SanitizeJsonValue(options)
  4. {json string value}.SanitizeXmlValue(options)

How to create your custom JSON configurations.
* Create folder with name **JSOptions** under your project then create json file with name **SanitizerOptions.json** under the said folder as your default configuration and follow the object format below.
{Project.Name}/JSOptions/SanitizerOptions.json

JSanitizer Configuration schema

note: It will throw an exception if you use the default json or xml extension methods without providing default json configurations.

remarks: You can add more properties under Sensitivity for value masking.

Code implementations:

  1. Sanitize without options
JSanitizer with JSON Configuration.

2. Sanitize with options

JSanitizer with class configuration.

Note: If you encounter error, please follow screenshot below:

Looking for a JOB? Signup @ jobbhy and be notified!
https://jobbhy.com

Want to post a JOB as employer? Contact and be one us!
https://www.jobbhy.com/#/contactus

Twitter: https://twitter.com/_EthanHunt07

LinkedIn: https://www.linkedin.com/feed/update/urn:li:activity:6556857396478734336

Facebook: https://www.facebook.com/groups/vuejsdevelopers/permalink/690896881322331/

Axios Refresh Token (A simple and straightforward request interceptor.)
https://www.npmjs.com/package/axios-jwtoken-refresher

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Joever Monceda
Joever Monceda

Written by Joever Monceda

Sr. Software Engineer @ Jobbhy Inc.

No responses yet

Write a response