Text and Data Formats

  1. Encoding and Decoding Text Files

    Encoding turns text into bytes according to a named convention. A reader uses the same convention to recover the text.

    Undergraduate
  2. Leading and Continuation Bytes in UTF-8

    A UTF-8 character may occupy several bytes. The first byte indicates the sequence length, while following bytes follow a continuation pattern.

    Undergraduate
  3. Choosing a Text Decoding Error Policy

    Invalid encoded input can be rejected, be replaced with a visible marker, or be handled under another explicitly documented rule.

    Undergraduate
  4. Byte Order Marks at the Start of Text

    Some Unicode formats use an initial mark to convey an encoding convention. UTF-8 can optionally use its byte representation as a signature.

    Undergraduate
  5. LF and CRLF in Text Records

    A text format can use one or more bytes as a line ending. Reader settings determine whether those endings appear distinct in decoded strings.

    Undergraduate
  6. Reading Unicode Code Point Notation

    A Unicode code point names a value in the Unicode codespace. Its hexadecimal identifier is distinct from how an encoding writes it.

    Undergraduate
  7. Separators and Escaping in Text Formats

    A delimiter needs a rule to distinguish separators from literal data bearing the same spelling.

    Undergraduate
  8. Reading CSV with Embedded Commas

    CSV readers treat commas inside quoted fields as data under the applicable dialect, so rows require a format-aware parser.

    Undergraduate
  9. Quotes and Newlines Inside CSV Fields

    A quoted CSV field can include delimiters, escaped quotation marks, and under common CSV rules an embedded line break.

    Undergraduate
  10. Column Names and Field Order in CSV

    A CSV header assigns names to column positions when the file is declared to include one. A reader needs a policy for absent or repeated names.

    Undergraduate
  11. Missing and Empty Fields in Delimited Rows

    An empty field occupies a position. A missing field changes the number of fields available to a reader.

    Undergraduate
  12. JSON Objects, Arrays, and Their Roles

    JSON arrays store ordered values. JSON objects associate string names with member values under the format's object rules.

    Undergraduate
  13. JSON Null Versus an Absent Member

    An object can contain a name whose value is null, or omit the name entirely. Those records can carry different application meanings.

    Undergraduate
  14. JSON Numbers Across Different Runtimes

    JSON specifies a number syntax, while readers may store the parsed value in different numeric representations.

    Undergraduate
  15. One JSON Value Per Line

    A line-oriented JSON convention groups one encoded JSON value per logical line so a reader can process one record at a time.

    Undergraduate
  16. Reading Escaped Characters in JSON

    JSON string syntax uses escapes to represent characters whose literal use would interfere with the string grammar or is convenient to encode.

    Undergraduate
  17. Plain Text and Structured Text Files

    A structured text format has a grammar defining record boundaries, field names, or types. Following that grammar is how a reader recovers data.

    Undergraduate
  18. Versioning a Serialized Record

    A version or a compatible format contract helps a reader interpret records produced by different editions of a program.

    Undergraduate
  19. Reading Length-Prefixed Records

    A length-prefixed format records the size of a payload before its bytes, so payload characters need not serve as delimiters.

    Undergraduate
  20. Delimiter and Length Framing

    A byte stream needs record boundaries if it carries several messages. Delimiters and lengths supply different framing rules.

    Undergraduate
  21. Required and Optional Data Fields

    A schema can state which named fields must be present and which optional ones can use a defined default or absent state.

    Undergraduate
  22. Structural and Domain Validation of Data

    Structural validation checks that a record has the intended fields and types. Domain validation checks the rule those values are meant to obey.

    Undergraduate
  23. Escaping and Character Encoding

    Escaping follows a textual grammar to distinguish special data. Character encoding maps the resulting text into bytes.

    Undergraduate
  24. File Extensions, Signatures, and Structure

    An extension records a naming convention. A signature and a parser inspect evidence contained within the file.

    Undergraduate
  25. Line Numbers and Byte Offsets in Diagnostics

    A file diagnostic can identify a source line and column or the exact position in serialized bytes. The two measurements answer different questions.

    Undergraduate
  26. Storing Timestamps and Durations

    A timestamp identifies an observation time under a declared convention. A duration measures the difference or a length of time.

    Undergraduate
  27. Keeping Exact and Normalized Field Spellings

    The same application can preserve a source field for display and derive a normalized key for comparison.

    Undergraduate
  28. When a Record Round Trip Is Lossless

    A round trip is lossless relative to specified information. It can preserve a parsed value while changing formatting, member order, or exact bytes.

    Undergraduate
  29. Reading a Small Data Schema Example

    A useful schema example reveals field names, types, constraints, and the treatment of values that do not follow those expectations.

    Undergraduate
  30. Designing a Small Data Exchange Contract

    A data exchange specification should name the encoding, record structure, required fields, and handling of invalid or newer values.

    Undergraduate