======================================================================
 mb::JSON Cheat Sheet                                  [VI] Tiếng Việt
======================================================================

[ Ánh xạ kiểu dữ liệu ]
  JSON       -> Perl
  -----------------------------------------------
  "chuỗi"   -> scalar string
  123        -> scalar số
  true       -> mb::JSON::Boolean (giá trị: 1)
  false      -> mb::JSON::Boolean (giá trị: 0)
  null       -> undef
  [...]      -> array reference
  {...}      -> hash reference

[ 1. Nạp mô-đun ]
  use mb::JSON;

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

[ 3. parse: alias của decode() ]
  my $data = mb::JSON::parse($json_text);

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

[ 5. stringify: Perl -> JSON  (alias tương thích JavaScript) ]
  my $json = mb::JSON::stringify($data);
  # stringify() và encode() cho kết quả giống nhau

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

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

[ 8. Khóa hash được sắp xếp theo thứ tự bảng chữ cái, UTF-8 giữ nguyên ]

[ 9. Ví dụ ]
  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}
