mapr / maprdb-python-client

Other
5 stars 8 forks source link

MAPRDB-1337 Change set to array logic in OJAIDocument. #43

Closed dshylov closed 6 years ago

dshylov commented 6 years ago

Changed set to array logic in OJAIDocument

adityakishore commented 6 years ago

@dshylov Is this how the API work in Java?

dshylov commented 6 years ago

We talked about this earlier. I forgot to change the logic. Example:

doc = OJAIDocument().set('a.b.c', [1, 2, 3])
print(doc.as_dictionary())
doc.set('a.b.c[10]', 10)
print(doc.as_dictionary())

Output:

{u'a': {u'b': {u'c': [1, 2, 3]}}}
{u'a': {u'b': {u'c': [1, 2, 3, None, None, None, None, None, None, None, 10]}}}