<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/extmod/modujson.c, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2021-03-15T13:57:36+00:00</updated>
<entry>
<title>run code formatting script</title>
<updated>2021-03-15T13:57:36+00:00</updated>
<author>
<name>microDev</name>
<email>70126934+microDev1@users.noreply.github.com</email>
</author>
<published>2021-03-15T13:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a52eb88031620a81521b937f2a0651dbac2bb350'/>
<id>urn:sha1:a52eb88031620a81521b937f2a0651dbac2bb350</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Ignore size parameter</title>
<updated>2020-11-23T20:14:58+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-11-23T20:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=368fa88312c14d1a74f44b7539fb00c7ef8754f8'/>
<id>urn:sha1:368fa88312c14d1a74f44b7539fb00c7ef8754f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Speed up JSON parsing with readinto</title>
<updated>2020-11-20T01:13:24+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-11-20T01:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=123210a989eae73fb60146d707f7ba890f8311ee'/>
<id>urn:sha1:123210a989eae73fb60146d707f7ba890f8311ee</id>
<content type='text'>
Get a chunk of data from readinto instead of a single byte. This
speeds up the parsing by reducing the number of function calls.

Fixes #3703
</content>
</entry>
<entry>
<title>Merge pull request #3143 from tannewt/improve_json</title>
<updated>2020-07-16T18:33:33+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@adafruit.com</email>
</author>
<published>2020-07-16T18:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=88d89563783771daba2973eb8dc3faa237ba4b62'/>
<id>urn:sha1:88d89563783771daba2973eb8dc3faa237ba4b62</id>
<content type='text'>
Add support to json.load for any object with readinto</content>
</entry>
<entry>
<title>Fix stream version and add basic readinto test</title>
<updated>2020-07-11T00:33:17+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-11T00:33:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=372bcf8a956c8b20c423333114d7aa061dd54751'/>
<id>urn:sha1:372bcf8a956c8b20c423333114d7aa061dd54751</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support to json.load for any object with readinto</title>
<updated>2020-07-10T23:42:32+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-10T23:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=734661e79cc2b108079377642ef24fab1217c484'/>
<id>urn:sha1:734661e79cc2b108079377642ef24fab1217c484</id>
<content type='text'>
This way we don't need to load the whole string version of the
json into memory.
</content>
</entry>
<entry>
<title>Add license to some obvious files.</title>
<updated>2020-07-06T18:16:25+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-06-03T22:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34b4993d63a6b576f29d624385c681f679b4124c'/>
<id>urn:sha1:34b4993d63a6b576f29d624385c681f679b4124c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ujson: back out overeager loads() change; only change load()</title>
<updated>2020-05-11T04:56:01+00:00</updated>
<author>
<name>warriorofwire</name>
<email>3454741+WarriorOfWire@users.noreply.github.com</email>
</author>
<published>2020-05-11T04:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d8491f31768b04322728bc436b2f8e6c5f2bf0d6'/>
<id>urn:sha1:d8491f31768b04322728bc436b2f8e6c5f2bf0d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ujson: do not eat trailing whitespace</title>
<updated>2020-05-11T03:45:42+00:00</updated>
<author>
<name>warriorofwire</name>
<email>3454741+WarriorOfWire@users.noreply.github.com</email>
</author>
<published>2020-05-11T03:45:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eb3d5fa453bd04cc116e704c36a97250c93b7b4b'/>
<id>urn:sha1:eb3d5fa453bd04cc116e704c36a97250c93b7b4b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add CIRCUITPY macro; rename u* only when CIRCUITPY=1</title>
<updated>2019-02-21T16:09:44+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-02-21T16:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=10d3a20f8a639ad8ef5555e2142052190e8a7e13'/>
<id>urn:sha1:10d3a20f8a639ad8ef5555e2142052190e8a7e13</id>
<content type='text'>
</content>
</entry>
</feed>
