avian2 / jsonmerge

Merge a series of JSON documents.
MIT License
214 stars 25 forks source link

Json name/value pairs with forward slash #22

Closed chseeling closed 8 years ago

chseeling commented 8 years ago

I used version jsonmerge-1.1.0 with name values pairs like {test: {"MDT_c/kw/day": 0}} but in current version a schema error is raised. It appears somethings has changed on how forward slashes are used or interpreted when there are nested objects.

avian2 commented 8 years ago

Thanks for your bug report. Please provide a minimal, self contained script that raises the schema error you mention and I will look into it.

chseeling commented 8 years ago

The code below will produce the error jsonschema.exceptions.RefResolutionError: Unresolvable JSON pointer: u'tariff/summer/MDT_c/kw/day'

from jsonmerge import merge

bf = [{"code":'N'}]
tf = [{"code":'M',"tariff":{"summer": {"MDT_c/kw/day": 0}}}]

config = merge(bf[0],tf[0])
print config