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.

Response property casting

See original GitHub issue

Hey, I updated from version 3.16.11 to the latest version 4.2.0. Before the update, the values in the response json were automatically casted to the defined property type.

// origin object
    createdAt: '1602582518'

//object after response.json()
    createdAt: 1602582518

In the openapi spec:

        type: number
        format: int64
        nullable: true

This behavior is lost in the latest version. Is there an option to enable this property casting?

Issue Analytics

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

github_iconTop GitHub Comments

cdimasciocommented, Nov 19, 2020

@MadMango sure thing. There is already precedence so it makes sense. please go ahead and get started on the feature. I’ll review once it’s ready. Thanks!

dotMortiscommented, Nov 9, 2020

@cdimascio Oh hey, this works as expected. Many thanks. I want to work on the fileUploader thing in the next few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript casting object's property - Stack Overflow
So my question is: Is there an easier way to cast the target property to <IDBOpenDBRequest> other then the a , b method...
Read more >
How to safely cast by using pattern matching and the is and as ...
Learn to use pattern matching techniques to safely cast variables to a different type. You can use pattern matching as well as the...
Read more >
Eloquent: Mutators & Casting - Laravel - The PHP Framework ...
Accessors, mutators, and attribute casting allow you to transform Eloquent attribute values when you retrieve or set them on model instances.
Read more >
Optimization studies of stir casting parameters and ... - Nature
Three stir casting parameters of stirring temperature, speed, and time were varied and optimized using the central composite design technique ...
Read more >
Type checks and casts - Kotlin
Smart casts​​ val local variables - always, with the exception of local delegated properties. val properties - if the property is private or ......
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 Post

No results found

github_iconTop Related Hashnode Post

No results found