import json

from datawire.views.util import JSONEncoder


class Store(object):

    def __init__(self, url):
        self.url = url

    def store(self, frame):
        urn = frame.get('urn')
        data = json.dumps(frame, cls=JSONEncoder)
        return self._store(urn, data)

    def load(self, urn):
        data = self._load(urn)
        if data is not None:
            data = json.loads(data)
        return data

import json

from datawire.views.util import JSONEncoder


class Store(object):

    def __init__(self, url):
        self.url = url

    def store(self, frame):
        urn = frame.get('urn')
        data = JSONEncoder().encode(frame)
        return self._store(urn, data)

    def load(self, urn):
        data = self._load(urn)
        if data is not None:
            data = json.loads(data)
        return data

Fix encoding of store serialisation.
Fix encoding of store serialisation. 
  import json
  
  from datawire.views.util import JSONEncoder
  
  
  class Store(object):
  
      def __init__(self, url):
          self.url = url
  
      def store(self, frame):
          urn = frame.get('urn')
-         data = json.dumps(frame, cls=JSONEncoder)
+         data = JSONEncoder().encode(frame)
          return self._store(urn, data)
  
      def load(self, urn):
          data = self._load(urn)
          if data is not None:
              data = json.loads(data)
          return data
  
Fix encoding of store serialisation.
## Code Before:
import json

from datawire.views.util import JSONEncoder


class Store(object):

    def __init__(self, url):
        self.url = url

    def store(self, frame):
        urn = frame.get('urn')
        data = json.dumps(frame, cls=JSONEncoder)
        return self._store(urn, data)

    def load(self, urn):
        data = self._load(urn)
        if data is not None:
            data = json.loads(data)
        return data

## Instruction:
Fix encoding of store serialisation.
## Code After:
import json

from datawire.views.util import JSONEncoder


class Store(object):

    def __init__(self, url):
        self.url = url

    def store(self, frame):
        urn = frame.get('urn')
        data = JSONEncoder().encode(frame)
        return self._store(urn, data)

    def load(self, urn):
        data = self._load(urn)
        if data is not None:
            data = json.loads(data)
        return data
