Introduction

Data Standardizer provides implementations of various internationally recognised standards in data processing, covering topics ranging from languages to currencies and geographical entities. With strongly-typed enumerations for each standard (where applicable) or other targeted data types, you can represent these elements in your code such that errors with invalid values are minimised.
Supported target platforms include (modern) .Net and .Net Standard. Data Standardizer can be used in modern application software, but is also available as an option for older codebases that are being upgraded more gradually or may remain on older frameworks indefinitely.
📚 Documentation
Full documentation — user guides, concepts, and API reference for every package — is published at matthew25187.github.io/DataStandardizer.
Supporting the project
If you derive a commercial benefit from use of Data Standardizer or feel it otherwise adds value to your project, you are asked to please consider supporting the project. You can do this by becoming a GitHub sponsor to make a financial contribution. Data Standardizer is maintained and enhanced by @matthew25187 in his personal time and made available for free for all to use.
Getting Started
Installation
Data Standardizer is available as a series of packages from NuGet.org that can be linked to your existing projects. Available packages include:
| Package |
Description |
| DataStandardizer.Chronology |
Supports the following standards:- TZ Database
- Unix time
- DOS date & time
|
| DataStandardizer.Communication |
Supports the following standards:- Recommendation ITU-T E.164, The international public telecommunication numbering plan
- MIME, as defined by:
- RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
- RFC 2046, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
- RFC 2047, MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text
- RFC 2231, MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations
- RFC 2397, The “data” URL scheme
- RFC 2978, IANA Charset Registration Procedures
- RFC 4289, Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures
- RFC 4648, The Base16, Base32, and Base64 Data Encodings
- RFC 6657, Update to MIME regarding “charset” Parameter Handling in Textual Media Types
- RFC 6838, Media Type Specifications and Registration Procedures
- RFC 6839, Additional Media Type Structured Syntax Suffixes
|
| DataStandardizer.Core |
Common types used to implement standards in the other packages. You should not need to link to this package directly. |
| DataStandardizer.File.CSV |
Supports the following standards:- RFC 4180, Common Format and MIME Type for Comma-Separated Values (CSV) Files
|
| DataStandardizer.File.iCal |
Supports the following standards:- RFC 5545, Internet Calendaring and Scheduling Core Object Specification (iCalendar)
- RFC 6868, Parameter Value Encoding in iCalendar and vCard
- RFC 7986, New Properties for iCalendar
- RFC 7265, jCal: The JSON Format for iCalendar
- RFC 6321, xCal: The XML Format for iCalendar
|
| DataStandardizer.File.InternetMessage |
Supports the following standards:- RFC 5322, Internet Message Format
- RFC 6532, Internationalized Email Headers
- RFC 6854, Update to Internet Message Format to Allow Group Syntax in the “From:” and “Sender:” Header Fields
- MIME in a message, as defined by:
- RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
- RFC 2046, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
- RFC 2047, MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text
- RFC 2183, Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field
- RFC 2231, MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations
- RFC 2387, The MIME Multipart/Related Content-type
- RFC 2392, Content-ID and Message-ID Uniform Resource Locators
- RFC 3282, Content Language Headers
- RFC 2557, MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)
- RFC 4155, The application/mbox Media Type
- Apple Mail EMLX files, which have no published standard
|
| DataStandardizer.File.vCard |
Supports the following standards:- RFC 6350, vCard Format Specification
- RFC 6868, Parameter Value Encoding in iCalendar and vCard
- RFC 7095, jCard: The JSON Format for vCard
- RFC 6351, xCard: vCard XML Representation
- vCard 2.1, The Electronic Business Card
- RFC 2425, A MIME Content-Type for Directory Information, and RFC 2426, vCard MIME Directory Profile (vCard 3.0)
- RFC 2739, Calendar Attributes for vCard and LDAP
- RFC 4770, vCard Extensions for Instant Messaging (IM)
- RFC 9554, vCard Format Extensions for JSContact
- RFC 6473, vCard KIND:application, and RFC 6869, vCard KIND:device
- RFC 6474, vCard Format Extensions: Place of Birth, Place and Date of Death
- RFC 6715, vCard Format Extensions: Representing vCard Extensions Defined by the Open Mobile Alliance (OMA) Converged Address Book (CAB) Group
- RFC 8605, vCard Format Extensions: ICANN Extensions for the Registration Data Access Protocol (RDAP)
|
| DataStandardizer.Geography |
Supports the following standards:- ISO 3166-1, Codes for the representation of names of countries and their subdivisions – Part 1: Country code
- ISO 3166-2, Codes for the representation of names of countries and their subdivisions – Part 2: Country subdivision code
- UN M49, Standard Country or Area Codes for Statistical Use (Series M, No. 49)
|
| DataStandardizer.Language |
Supports the following standards:- ISO 639, Code for the representation of names of languages
- Part 1: Alpha-2 code
- Part 2: Alpha-3 code
- Part 3: Alpha-3 code for comprehensive coverage of languages
- Part 5: Alpha-3 code for language families and groups
- ISO 15924, Codes for the representation of names of scripts
|
| DataStandardizer.LanguageTag |
Supports the following standards:- IETF BCP 47 language tags, as defined by:
- RFC 5646, Tags for Identifying Languages, including well-formed and valid tags, and the IANA Language Subtag Registry format
|
| DataStandardizer.Money |
Supports the following standards:- ISO 4217, Codes for the representation of currencies and funds
- Table A.1 – Current currency & funds code list
- Table A.2 – Current funds codes
- Table A.3 – List of codes for historic denominations of currencies & funds
- Money type, as described in Patterns of Enterprise Application Architecture by Martin Fowler
|
To use a particular standard in your application, find the corresponding package from the above list and add it as a dependency to your project. Instructions for doing so will depend on what development tooling you are using.
See the Get started guide for step-by-step installation and a quickstart.
Software dependencies
Depending on which .Net platform you are targeting, the above packages will also depend on various other system- and third-party packages. They will be included as static dependencies where required and should be automatically resolved, but if you are using a proxy for your package server you may need to make sure these other packages are also available. For example, the netstandard1.1 and netstandard2.0 builds of DataStandardizer.LanguageTag depend on System.Memory for their span-based API.
Latest releases
| Package |
Promoted version |
nuget.org |
Release build |
| DataStandardizer.Chronology |
 |
 |
 |
| DataStandardizer.Communication |
 |
 |
 |
| DataStandardizer.Core |
 |
 |
 |
| DataStandardizer.File.CSV |
 |
 |
 |
| DataStandardizer.File.iCal |
 |
 |
 |
| DataStandardizer.File.InternetMessage |
 |
 |
 |
| DataStandardizer.File.vCard |
 |
 |
 |
| DataStandardizer.Geography |
 |
 |
 |
| DataStandardizer.Language |
 |
 |
 |
| DataStandardizer.LanguageTag |
 |
 |
 |
| DataStandardizer.Money |
 |
 |
 |
The promoted version is the latest release promoted from this repository’s builds (a GitHub Release). It does not necessarily correspond with the latest package version published to NuGet or any other publically available source.
Build and test
Data Standardizer is open source so you can read, build, and adapt it for your own use. The project does not currently accept third-party code contributions; the instructions below are provided as a convenience for working with your own copy or fork of the repository.
After cloning the repository, you can compile the entire solution from the repository root:
dotnet build DataStandardizer.sln
and run the XUnit-based tests with:
dotnet test DataStandardizer.sln
Per-package solution filter (*.slnf) files let you build or test a single package in isolation. For the full branching strategy, per-package builds, IDE testing, and the PowerShell scripts that regenerate the standard enums, see Build from source in the documentation.
Usage
Though each package contains many types, typically there are only a few you will use directly in your application. See the project documentation for user guides, concepts, and API reference covering each package — including built-in CSV reading, writing, and normalization in DataStandardizer.File.CSV, iCalendar reading, writing, and recurrence expansion in DataStandardizer.File.iCal, reading and writing of Internet messages in EML, MHTML, mbox and EMLX files in DataStandardizer.File.InternetMessage, and reading, writing and conversion of vCard 4.0, 3.0 and 2.1 cards, jCard and xCard in DataStandardizer.File.vCard.
评论