'Returns a dictionary of the attributes of this object, in
a layout corresponding to what BokehJS expects at unmarshalling time.
This method does not convert "Bokeh types" into "plain JSON types,"
for example each child Model will still be a Model, rather
than turning into a reference, numpy isn\'t handled, etc.
That\'s what "json like" means.
This method should be considered "private" or "protected",
for use internal to Bokeh; use to_json() instead because
it gives you only plain JSON-compatible types.
Args:
include_defaults (bool) : whether to include attributes
that haven\'t been changed from the default.'

def _to_json_like(self, include_defaults):

    all_attrs = self.properties_with_values(include_defaults=include_defaults)
    subtype = getattr(self.__class__, '__subtype__', None)
    if ((subtype is not None) and (subtype != self.__class__.__view_model__)):
        attrs = {}
        for (attr, value) in all_attrs.items():
            if (attr in self.__class__.__dict__):
                continue
            else:
                attrs[attr] = value
    else:
        attrs = all_attrs
    for (k, v) in attrs.items():
        if (isinstance(v, float) and (v == float('inf'))):
            attrs[k] = None
    return attrs
