A comprehensive guide to mastering JSON transformation with Computo and Permuto
Chapter 1: Why JSON Transformation Matters - The problem space of JSON transformation - Introduction to the Computo/Permuto solution - Real-world use cases and scenarios
Chapter 2: Setting Up Your Environment - Building Computo from source - Verifying your installation - Running your first transformation
Chapter 3: Computo Basics - Data and Logic
- Understanding the "code as data" philosophy
- Basic syntax and operators
- Your first transformations
- Operators introduced: +
, -
, *
, /
, %
, obj
, {"array": [...]}
, $input
, get
, let
, $
Chapter 4: Permuto Basics - Template Processing
- Declarative templating with ${path}
syntax
- Type preservation and string interpolation
- Integration with Computo scripts
- Operators introduced: permuto.apply
Chapter 5: Control Flow and Logic
- Conditional expressions with if
- Comparison operators
- Building decision trees
- Operators introduced: if
, >
, <
, >=
, <=
, ==
, !=
, &&
, ||
, not
, approx
(plus truthiness rules and short-circuit evaluation)
Chapter 6: Working with Arrays
- Array literals and basic operations
- Introduction to functional programming concepts
- Lambda expressions and lambda variable resolution for reusable functions
- String manipulation with concatenation
- Operators introduced: map
, lambda
, str_concat
Chapter 7: Object Manipulation
- Creating and merging objects
- JSON Pointer navigation
- Variable scoping with let
- Operators introduced: merge
Chapter 8: Advanced Array Operations
- Functional programming with map
, filter
, and reduce
- Complex data transformations
- Array pairing and indexing operations
- Performance considerations
- Operators introduced: filter
, reduce
, find
, some
, every
, flatMap
, zip
, zipWith
, mapWithIndex
, enumerate
Chapter 9: Template-Driven Transformations - Combining Computo logic with Permuto templates - Dynamic template generation - Configuration management patterns
Chapter 10: Data Pipeline Patterns - Multi-step transformations - Aggregation and summarization - Validation and error handling
Chapter 11: Complex Real-World Examples - API response transformation - Configuration file generation - Data migration scenarios
Chapter 12: Performance and Optimization - Understanding Computo's execution model - Memory usage and large datasets - Optimization strategies
Chapter 13: Error Handling and Debugging - Understanding exception types - Debugging strategies - Graceful error recovery
Chapter 14: Best Practices and Patterns - Code organization and reusability - Testing transformation scripts - Maintainable patterns
Chapter 15: Multiple Input Processing and JSON Patch Operations
- Working with multiple input documents using $inputs
- RFC 6902 JSON Patch support with diff
and patch
operators
- Document versioning and change management
- Multi-document processing patterns
- Operators introduced: $inputs
, diff
, patch
, car
, cdr
, cons
, append
, chunk
, partition
, count
Appendix A: Complete Operator Reference - Comprehensive reference for all 40 operators - Syntax examples and use cases - Quick lookup guide - All operators now covered: Complete documentation in chapters and appendix
Start with Chapter 1 to understand the motivation, then proceed through Chapter 2 for setup and Chapter 3 for fundamentals.
Skip directly to Chapter 3 for syntax basics, then jump to specific topics of interest or the Operator Reference for quick lookup.
This guide assumes you are an experienced developer familiar with JSON, functional programming concepts, and command-line tools. We focus on practical examples and real-world scenarios rather than theoretical explanations.
Ready to transform JSON like a pro? Let's begin with Chapter 1: Why JSON Transformation Matters.