Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hal_codec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import uritemplate


__version__ = "1.0.0"
__version__ = "1.0.1"


def _get_string(item, key):
Expand Down Expand Up @@ -214,10 +214,11 @@ def dump(self, document, indent=False, **kwargs):
data = _document_to_primative(document)
return force_bytes(json.dumps(data, **options))

def load(self, bytes, base_url=None):
def load(self, bytes, **kwargs):
"""
Takes a bytestring and returns a document.
"""
base_url = kwargs.get('base_url', None)
try:
data = json.loads(bytes.decode('utf-8'))
except ValueError as exc:
Expand Down