======================================================================
 mb::JSON Cheat Sheet                                     [TH] ภาษาไทย
======================================================================

[ การแมปชนิดข้อมูล ]
  JSON       -> Perl
  -----------------------------------------------
  "string"   -> scalar string
  123        -> scalar ตัวเลข
  true       -> mb::JSON::Boolean (ค่า: 1)
  false      -> mb::JSON::Boolean (ค่า: 0)
  null       -> undef
  [...]      -> array reference
  {...}      -> hash reference

[ 1. โหลดโมดูล ]
  use mb::JSON;

[ 2. decode: JSON -> Perl ]
  my $data = mb::JSON::decode($json_text);

[ 3. parse: alias ของ decode() ]
  my $data = mb::JSON::parse($json_text);

[ 4. encode: Perl -> JSON ]
  my $json = mb::JSON::encode($data);

[ 5. stringify: Perl -> JSON  (alias ที่เข้ากันได้กับ JavaScript) ]
  my $json = mb::JSON::stringify($data);
  # stringify() และ encode() ให้ผลลัพธ์เหมือนกัน

[ 6. Boolean ]
  mb::JSON::true  -> true
  mb::JSON::false -> false

[ 7. null / undef ]
  undef -> null  /  null -> undef

[ 8. Hash keys sorted, UTF-8 kept as-is ]

[ 9. ตัวอย่าง ]
  my $h = mb::JSON::decode('{"name":"Alice","ok":true}');
  my $j = mb::JSON::encode({name=>'Alice',ok=>mb::JSON::true});
  my $j = mb::JSON::stringify({name=>'Alice',ok=>mb::JSON::true});
  # -> {"name":"Alice","ok":true}
