Search code examples
crystal-lang

Crystal equivalent shard for "pp" (pretty printing)


What is the Crystal equivalent shard for "pp" used in Ruby for pretty printing complex data structures ?


Solution

  • PrettyPrint is a part of a Crystal stdlib.

    In short, you can just do p obj for "inspect" style output, pp obj for "pretty inspect" style output.