473,383 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Double value 0.0 classed as Nothing?

116 64KB
Hi.

I am retrieving JSON data. Not all parameters are returned each time and some that are returned might be a double value of 0.0.

The problem is, I thought that I could just check if the parameter was returned by using the following....

Expand|Select|Wrap|Line Numbers
  1. 'mydata is the parsed JSON response, value1 is a double value
  2. If Not mydata.value1 Is Nothing Then
  3. ' process
  4. Else
  5. 'ignore
  6. End If
  7.  
However if mydata.value1 = 0.0 it seems to treat this as Nothing and bypasses the processing.

I can't convert it to another format since as soon as I try to do that it will crash if mydata.value1 isn't part of the returned data.

Is there another way to determine if the parameter was returned in the response other than 'Nothing'?

Thanks

EDIT: At the moment I'm forcing the response value to be read as a string which seems to help but there has to be a proper way to do this since the true data is returned as a double
Mar 29 '15 #1
0 1113

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: nooy66 | last post by:
I need to read value type double form my binary file. When i use Hex Workshop software read my binary file. i have data 8 bytes : hex = 3131 3131 3131 3140 string = 1111111@ Float =...
29
by: Peter Ammon | last post by:
What's the most negative double value I can get? Is it always guaranteed to be -DBL_MAX? If so, why (or rather, where)? Thanks.
1
by: San | last post by:
Hi, I'm using a Managed C++ project with MFC support. I have an ArrayList pointer object alValue (ArrayList* alValue) to this object i want to add all the elements present in Vector<double>...
4
by: Maria | last post by:
I've tried to search for a way to set a datetimepicker.value to nothing. I would like it to display nothing until the user select a value.. I know you can use a checkbox to disable the control -...
1
by: Martin Pöpping | last post by:
Hello, I´ve a problem with parsing a double value from an xml file. My code looks like this: int concept_id; double rank; XmlElement root = documentXMLString.DocumentElement; XmlNodeList...
6
by: Java1963 | last post by:
Need help with writting an application that prompt for and read a double value representing a monetary amount. -------------------------------------------------------------------------------- ...
4
by: Max80 | last post by:
Hi Everyone, I have a double value (e.g. 2.00) which I would like to convert to string. Simply returning the value using the .ToString() method trims the 0s after the decimal...
4
by: ashishbhatt12 | last post by:
Hi all, i have a problem in the value which stored in memory location.i want to convert it into the double value. Suppose, i have the value int k = 2; when I write it on the memory...
2
by: blazzer | last post by:
Hi, I need help. I just wondering whether i can set the double value using random class..i even use if statement to set it..but nothing..i wanna set between 0.5 n 0.7 value.. double planetMass...
1
by: aamirsami | last post by:
hi, i am using Math.Sin(value). this function returns a signed double value. eg. double ans = Math.Sin(value); but i want the result as a sbyte like sbyte ans=Math.Sin(value); I have used...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.