Repository navigation
API Overview
Marcus Ackre Medina edited this page Sep 13, 2026
·
1 revision
Namespace: MarcusMedina.Fluent.Data.Extensions
| Method | Description |
|---|---|
ToCsvField(delimiter) |
Escapes value for use in a CSV line |
FromCsvField() |
Unescapes a CSV field |
SplitCsvLine(delimiter) |
Splits a CSV line respecting quoted fields |
ToCsvLine(delimiter) |
Joins an IEnumerable<string> into a CSV line |
FromCsvDocument(delimiter) |
Parses a full CSV document into IEnumerable<string[]> (one array per row) |
FromCsv<T>(mapRow, hasHeaders, delimiter) |
Parses a full CSV document and maps each row to T via a delegate |
| Method | Description |
|---|---|
ToCsvLine(delimiter) |
IEnumerable<object?> → one CSV line (calls ToString() on each value) |
ToCsvDocument(delimiter) |
IEnumerable<IEnumerable<object?>> → full CSV document (rows joined with Environment.NewLine) |
ToCsvDocument<T>(mapRow, headers, delimiter) |
IEnumerable<T> → full CSV document, with an optional header row |
| Method | Description |
|---|---|
ToJsonString() |
Escapes string for embedding in JSON |
FromJsonString() |
Unescapes a JSON string |
IsValidJson() |
Returns true if valid JSON |
| Method | Description |
|---|---|
ToJson<T>(writeIndented) |
Serializes any object to a JSON string (camelCase properties) |
FromJson<T>() |
Deserializes a JSON string into T
|
| Method | Description |
|---|---|
ToXmlContent() |
Escapes text for use as XML content |
FromXmlContent() |
Decodes XML-encoded content |
| Method | Description |
|---|---|
ToXmlAttributes() |
IEnumerable<KeyValuePair<string, object?>> → an XML attribute string (id="1" name="Anna") |
ToXmlElement(content, attributes) |
Builds a full <element attr="...">content</element> string from an element name, content, and optional attributes |
Base64, hex and URL-encoding helpers live in MarcusMedina.Fluent.Text (MarcusMedina.Fluent.Text.Core.Extensions.DataFormat), not here — MarcusMedina.Fluent.Data is scoped to CSV, JSON and XML.