Ujson should only worry about whitespace before JSON. This becomes apparent when you are using MP stream protocol to read directly from input buffers. When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout. Fixes: - Waiting for a timeout after you have completed reading a correct and complete JSON off the input. - Raising an OSError after reading a correct and complete JSON off the input. - Eating more data than semantically owned off the input buffer. - Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object. Code you would write before: ``` line = board_busio_uart_port.read_line() json_dict = json.loads(line) ``` or reaching for fixed buffers and swapping them around in Python. Code that did not work before that does now: ``` json_dict = json.load(board_busio_uart_port) ``` - This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs. - It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA. - It simplifies code that users write while improving their apps.
SAMD21 and SAMD51 ================== This port supports many development boards that utilize SAMD21 and SAMD51 chips. See https://circuitpython.org/downloads for all supported boards. Building -------- For build instructions see this guide: https://learn.adafruit.com/building-circuitpython/ Debugging --------- For debugging instructions see this guide: https://learn.adafruit.com/debugging-the-samd21-with-gdb Port Specific modules --------------------- .. toctree:: bindings/samd/__init__