Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Address Infinity and NaN JSON Serialisation #7

Open
@MarkKoz

Description

@MarkKoz

Quote from Python's json module documentation:

This module does not comply with the RFC in a strict fashion, implementing some extensions that are valid JavaScript but not valid JSON. In particular:

  • Infinite and NaN number values are accepted and output;

This is a problem because JavaScript's JSON parser will consider values such asInfinity (note this isnot a string) as invalid.

A customJSONEncoder can be used to address these issues, but the question remainsto what these values should be serialised. What format will allow JavaScript to properly interpret them? Oddly enough, JS itself serialisesInfinity tonull so that's not an answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp