Skip to content

Commit

Permalink
Usar OrderedDict al leer de json
Browse files Browse the repository at this point in the history
Antes los actos mercantiles quedaban desordenando siendo el orden importante.
P.ej.: cese + nombramiento != nombramiento + cese
  • Loading branch information
PabloCastellano committed Feb 6, 2016
1 parent c280b32 commit 25bd94e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bormeparser/borme.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def set_default(obj):
@classmethod
def from_json(self, filename):
with open(filename) as fp:
d = json.load(fp)
d = json.load(fp, object_pairs_hook=OrderedDict)
cve = d['cve']
date = datetime.datetime.strptime(d['date'], '%Y-%m-%d').date()
seccion = d['seccion'] # TODO: SECCION.from_borme()
Expand Down

0 comments on commit 25bd94e

Please sign in to comment.