question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handling of NULL in Schema

See original GitHub issue

Hi all,

I have a Schema as such:

start_time = fields.Str()

In MariaDB this is often a NULL field.

When marshmallow serializes it, shouldn’t the output be

"start_time":'', (this is desired)

instead what I get is:

"start_time":null,

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
deckar01commented, Apr 23, 2018

It would be nice if allow_none=False forced serialization to fall back to the default value.

1reaction
vvalleecommented, Apr 23, 2018

@lafrech That would work for me I think. I’ve tried your code, but it doesn’t seem to help. The fields are still being generated if they don’t have a value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling the null type in JSON schema - IBM
When null types are sent to the z/OS® Connect server, they are passed through in the body and not represented in the Swagger...
Read more >
null — Understanding JSON Schema 2020-12 documentation
When a schema specifies a type of null , it has only one acceptable value: null . Note. It's important to remember that...
Read more >
Handling NULL in Parse JSON - Power Platform Community
Handling NULL in Parse JSON. ‎06-16-2017 11:12 AM. I have an API which has the following characteristics: Schema: { "type": "array", "items": {...
Read more >
Specify a value can be a string or null with JSON Schema
I'm getting a block of JSON with some properties that can be null or a string . How do you specify, in a...
Read more >
NULL Handling | CockroachDB Docs
Learn how NULL values are handled in CockroachDB SQL. ... A NULL value in a table is a value in a field that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found