[dumper] Implement simple scalar style detection.