sub json_key_exists {
	use JSON;
	my($key, $json_text) = @_;
	return("") unless ($key and $json_text);
	my($json_obj) = decode_json($json_text);
	my %keys = map { $_ => 1 } keys(%$json_obj);
	return($keys{$key} ? 1 : 0);
}
