Skip to content

Commit b3968f8

Browse files
committed
micropython/senml: Remove u prefix from imports.
1 parent b35a960 commit b3968f8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

micropython/senml/senml/senml_pack.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from senml.senml_record import SenmlRecord
2828
from senml.senml_base import SenmlBase
29-
import ujson
29+
import json
3030
from cbor2 import encoder
3131
from cbor2 import decoder
3232

@@ -166,7 +166,7 @@ def from_json(self, data):
166166
:param data: a string containing json data.
167167
:return: None, will r
168168
"""
169-
records = ujson.loads(data) # load the raw senml data
169+
records = json.loads(data) # load the raw senml data
170170
self._process_incomming_data(records, SenmlPack.json_mappings)
171171

172172
def _process_incomming_data(self, records, naming_map):
@@ -242,7 +242,7 @@ def to_json(self):
242242
"""
243243
converted = []
244244
self._build_rec_dict(SenmlPack.json_mappings, converted)
245-
return ujson.dumps(converted)
245+
return json.dumps(converted)
246246

247247
def _build_rec_dict(self, naming_map, appendTo):
248248
"""

micropython/senml/senml/senml_record.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"""
2525

2626

27-
import ubinascii
27+
import binascii
2828
from senml.senml_base import SenmlBase
2929

3030

@@ -229,7 +229,7 @@ def _from_raw(self, raw, naming_map):
229229
elif naming_map["vb"] in raw:
230230
val = raw[naming_map["vb"]]
231231
elif naming_map["vd"] in raw:
232-
val = ubinascii.a2b_base64(raw[naming_map["vb"]])
232+
val = binascii.a2b_base64(raw[naming_map["vb"]])
233233
else:
234234
val = None
235235
self.value = val

0 commit comments

Comments
 (0)