JsonEncode now has 2 modes: pretty (default) and compact.
Expose record fields properly through dir()