Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

buildUrl uses JSON.stringify instead of toJSON method if it exists #6128

@pdanpdan

Description

@pdanpdan

buildUrl uses JSON.stringify to convert objects to string for $http.get,
but this converts Date objects to a quote enclosed string:
JSON.stringify(new Date()) => ""2014-02-05T15:15:22.612Z""
(new Date()).toJSON() => "2014-02-05T15:40:48.080Z"
I think buildUrl should use the object's toJSON method if it exists
This also applies to other objects that provide toJSON methods

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions