Size:
Color:
Hi Steve,
QUOTE:
I am unable to find a reference to this within the C# editor in WL
How come? References > .NET framework. If something's not listed, look for the DLL file to refer under:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\
You can even skip the generation of classes as .NET's JavaScriptSerializer will do a great job on dynamic deserialization of JSON:
CODE:
Please log in to see this code.
Take a look at Community Components:
\ExtensionMethods\InternetEx.cs >
GetExchange\Classes\Sentiment.cs >
ParseStockTwitsJson
Size:
Color:
Thanks for the help Eugene
Went looking in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\
I have the directory though System.Web.Script and JavaScriptSerializer don't appear.
I don't mean to be thick about this but not sure why that is. I do see a serializer for XML unless it is in System.Runtime.Serialization
Size:
Color:
Steve,
If something "does not appear" don't ask me, instead do some Google-fu. This is how answers are found.
At the very least you have to check System.Web and System.Core (for LINQ) in References, and refer to these DLLs on the other tab from the directory I pointed at above:
Microsoft.CSharp.dll
System.Runtime.Serialization.dll
System.Web.Extensions.dll
Microsoft scattered those namespaces across assemblies this way, so your job is to google the correct DLL in MSDN - it's thoroughly documented (or on StackOverflow - this usually is the shortcut).
Size:
Color:
Thanks Eugene
Believe me, I've spent considerable amount of time googling. It's not for lack of effort that's at issue.
Will keep plugging away.
Size:
Color:
Steve, here's a quick and dirty demo for you.
1. Check System.Web and System.Core (for LINQ) in References
2. Add references to these DLLs on the other tab from the directory I pointed at above:
Microsoft.CSharp.dll
System.Runtime.Serialization.dll
System.Web.Extensions.dll
CODE:
Please log in to see this code.
Obviously you'll want to add some error handling and some sort of anonymous type to get more properties than the "regularMarketPrice".
Size:
Color:
Thank you Eugene.
I greatly appreciate your help and as I said, I do spend a lot of time researching before coming here and asking. I'm generally reluctant to waste others people's time. I do hope other WL users will find this handy.
Size:
Color:
Glad to help you Steve.
Size:
Color:
Thanks again for the help. When using just a ticker e.g. QQQ rather than a specific option ticker e.g. QQQ171215C00156000 you can grab the whole chain of series of option for each expiration date. Your code gave me enough of a head start to put a serious dent in my project.
Size:
Color: