Coder Social home page Coder Social logo

bignum parse about frisby HOT 5 CLOSED

vlucas avatar vlucas commented on August 29, 2024
bignum parse

from frisby.

Comments (5)

vlucas avatar vlucas commented on August 29, 2024

Yes, I agree that this should be configured through a globalSetup option.

from frisby.

cstephe avatar cstephe commented on August 29, 2024

+1 I'm having issues with this as well, where sometimes when dealing with a '*' array type check frisby interprets numberStr as a number and other times it sees it as a function. I'm still tracking it down though. A sample debug is below for what its worth, It shows that the two items in the array look to be of the same type on line 598, However the first one is somehow interpreted by frisby as a function on line 1290 while the second one on line 1290 is interpreted as a number.

so far this seems to be happening only with the first item in a (*) all in array check.

line:596 all in array
line:598 json > below
{ timestamp: 1407336475931,
used: { numberStr: '2.39895984E8' },
free: { numberStr: '3.793975888E9' } }
line:1290 key:kt>used:function
line:1291 js typeof>function
line:1292 jsonTest below>
{ used: [Function: Number], timestamp: [Function: Number] }

line:598 json > below
{ timestamp: 1407336485927,
used: { numberStr: '2.73715896E8' },
free: { numberStr: '3.760155976E9' } }
line:1290 key:kt>used:number
line:1291 js typeof>object
line:1292 jsonTest below>
{ used: {}, timestamp: [Function: Number] }

from frisby.

cstephe avatar cstephe commented on August 29, 2024

FYI injecting JSON for bignumJSON > bignumJSON = JSON //require('json-bignum')
Fixes my issues, However, I'm not to familiar with the use of big number, but for those with a similar problem there you go.

from frisby.

vlucas avatar vlucas commented on August 29, 2024

I think I am going to just remove bignumJSON from the project. Anything that mutates the actual structure of the JSON is not a good solution IMHO. It will be removed in the next version of Frisby.

from frisby.

firehist avatar firehist commented on August 29, 2024

@vlucas Thanks a lot!

from frisby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.