to_dict

negmas.java.to_dict(value, deep=True, add_type_field=True, camel=True)[source]

Encodes the given value as nothing more complex than simple dict of either dicts, lists or builtin numeric or string values :param value: Any object :param deep: Whether we should go deep in the encoding or do a shallow encoding :param add_type_field: Whether to add a type field. If True, A field named PYTHON_CLASS_IDENTIFIER will be added :param giving the type of value: :param camel: Convert to camel_case if True

Remarks:
  • All iterables are converted to lists when deep is true.

  • If the value object has a to_java member, it will be called to do the conversion, otherwise its __dict__ or __slots__ member will be used.

See also

from_java, PYTHON_CLASS_IDENTIFIER