This directory contains step-by-step tutorials that teach you how to build real-world parsers using SharpParser.Core. Each tutorial includes complete working code examples and explains the concepts progressively.
Learn how to build a JSON parser that handles:
- Primitive values (strings, numbers, booleans, null)
- Objects and arrays with proper nesting
- Context-sensitive parsing using modes
- AST building for JSON structures
Difficulty: Intermediate Time: 30-45 minutes
Master CSV parsing with proper handling of:
- Quoted fields containing commas
- Escaped quotes within fields
- Mixed quoted and unquoted fields
- Record separation and field grouping
Difficulty: Intermediate Time: 30-45 minutes
Build parsers for configuration files including:
- INI file format with sections and key-value pairs
- Comment handling
- Properties files (Java-style)
- Extension patterns for other config formats
Difficulty: Beginner to Intermediate Time: 25-35 minutes
Each tutorial follows this structure:
- Prerequisites - What you need to get started
- Project Setup - How to create and configure a new project
- Understanding the Format - Overview of the data format being parsed
- Step-by-step Implementation - Progressive building of the parser
- Testing and Examples - Working code with test cases
- Advanced Features - Optional enhancements
- Next Steps - What to learn or build next
- .NET 6.0 SDK or later
- SharpParser.Core NuGet package
- Basic understanding of F# syntax
- A text editor or IDE (Visual Studio, VS Code with Ionide, Rider)
- Choose a tutorial based on your interests
- Follow the setup instructions to create a new project
- Work through each step, running the code as you go
- Experiment with the examples and modify them
- Check the related example files in
examples/for complete implementations
If you're new to SharpParser, we recommend:
- Start with Configuration File Parsers (simplest concepts)
- Move to CSV Parser (pattern matching and escaping)
- Advance to JSON Parser (modes and complex structures)
- Main Documentation - Overview and API reference
- Examples Directory - Complete working examples
- API Documentation - Detailed function reference
- Architecture Guide - How SharpParser works internally
Found an issue with a tutorial or want to add a new one? Check our contributing guidelines.
- Open an issue on GitHub
- Check existing examples in the
examples/directory - Review the API documentation for function details