circuitpython/shared-bindings/busio
warriorofwire eb3d5fa453 ujson: do not eat trailing whitespace
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.
2020-05-10 20:45:42 -07:00
..
__init__.c This __init__.h should be redundant. I deleted it for you 2019-06-06 15:44:29 +08:00
__init__.h Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master. 2017-08-25 22:17:07 -04:00
I2C.c rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
I2C.h Add support for grayscale displays that are < 8 bit depth. 2019-07-19 16:06:11 -07:00
OneWire.c rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
OneWire.h Do not allow a *io object to be used after deinit(). 2017-10-03 12:07:17 -07:00
SPI.c rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
SPI.h Stop hard-coding SPI frequency in FourWire 2019-04-06 15:15:29 +02:00
UART.c ujson: do not eat trailing whitespace 2020-05-10 20:45:42 -07:00
UART.h Addition of RS485 support 2020-02-18 23:16:40 +00:00