class_docstr: :class:`JAMLCompatible` is a mixin class designed to be used with multiple inheritance.
  
  It will add :meth:`to_yaml` and :meth:`from_yaml` to the target class,
  making that class JAML-friendly.
  
  .. warning::
      For the sake of cooperative multiple inheritance, do NOT implement :meth:`__init__` for this class
docstr: Verifies the yaml syntax of a given object by first serializing it and attempting to deserialize and catch
  parser errors
  :param obj: yaml object
  :return: whether the syntax is valid or not
docstr_tok: ["Verifies","the","yaml","syntax","of","a","given","object","by","first","serializing","it","and","attempting","to","deserialize","and","catch","parser","errors",":","param","obj",":","yaml","object",":","return",":","whether","the","syntax","is","valid","or","not"]
code: def is_valid_jaml(obj: Dict) -> bool:
      """
      Verifies the yaml syntax of a given object by first serializing it and attempting to deserialize and catch
      parser errors
      :param obj: yaml object
      :return: whether the syntax is valid or not
  
      """
      serialized_yaml = JAML.unescape(
          JAML.dump(obj),
          include_unknown_tags=False,
      )
  
      try:
          yaml.safe_load(serialized_yaml)
      # we only need to validate syntax, e.g, need to detect parser errors
      except yaml.parser.ParserError:
          return False
      except yaml.error.YAMLError:
          return True
      return True
  
imports: import copy
  import os
  import re
  import string
  import tempfile
  import warnings
  from types import SimpleNamespace
  from typing import Any, Dict, List, Optional, Set, TextIO, Tuple, Union
  import yaml
  from yaml.constructor import FullConstructor
  from jina.jaml.helper import JinaLoader, JinaResolver, get_jina_loader_with_runtime, load_py_modules, parse_config_source
  from jina.excepts import BadConfigSource
label_desc: Use image node_id 6 for calling the JAMLCompatible obj's underlying member method code with example usage: obj.is_valid_jaml(obj) and returns: True, False, True