15,897,032 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11373970 (Top 25 by date)
Member 11373970
29-Sep-16 5:26am
View
Thanks Karthik..!
https://www.sitepoint.com/google-maps-json-file/ (this is what am looking for)
No problem..my problem got solved from above link.
Member 11373970
29-Sep-16 4:26am
View
Please add three more values to each parameter of a class manually in above mentioned, because am not aware how to/where to add in above mentioned.
Member 11373970
29-Sep-16 3:08am
View
Actually will get the data from Hardware KIT(In final stage) and will convert all values to txt file in JSON format.
But,for this time being,need dummy data in txt file to check the functionally ..that too JSON format..
So, that data you have enter manually in txt file because you're aware of JSON and it's format.
Member 11373970
29-Sep-16 2:33am
View
No Karthik..! Not program am looking for.
Instead I just want you to create file with all values manually in json format(in txt file)..!
Later will read the data from that txt file to display the same in grid format.
Member 11373970
29-Sep-16 2:14am
View
Hey Karthik,
Need your help..! To create text file with all values in json format like below.
var obj = {
"A": {
"a": { "Current": 30.0},
"b": { "Current": 60.0},
"c": { "Current": 60.0},
"d": { "Current": 60.0},
"e": { "Current": 60.0},
"f": false
},
"B": {
"g": { "Current": 30.0},
"h": { "Current": 60.0},
"i": { "Current": 60.0},
"j": { "Current": 60.0},
},
"C": {
"k": { "Current": 30.0},
"l": { "Current": 60.0},
"m": { "Current": 60.0},
"n": { "Current": 60.0},
}
}
Need to add more three values to each parameter in above format..!
Like --> a--Current: 30.0,42.0,12.5,788
Member 11373970
28-Sep-16 9:39am
View
Thanks for your response Karthik..!
I will take care of conversion to/from JSON....just need values for each parameter of a class in json format(in text file) like mentioned above..!
Member 11373970
28-Sep-16 7:10am
View
Yes Karthik..I know that..!
But,for demo purpose to the client need some values in JSON format.
Member 11373970
28-Sep-16 4:42am
View
Same provided above.
For Screenshot: https://snag.gy/gPxpWK.jpg
Member 11373970
28-Sep-16 4:29am
View
PFB...!
Class A --> a,b,c,d,e,f
Class B --> g,h,i,j
Clacc C --> k,l,m,n
Sample Values:
a --> 5,8,10,12
b --> 2,4,3.5,6
c --> 4,2,3,5
d --> 200,620,401,124
e --> 5,10.1,15
f --> True/false
g --> 10,55,120,69
h --> 15,2.65,7.5,9
i --> 600,1.5,2,8
j --> 5,8,16,55
k --> 5,16,18,12
l --> 10.1,5,15,85
m --> 13,21,9,75
n --> 5,75,20,1
Member 11373970
28-Sep-16 3:57am
View
I'll get these values programmatically from Hardware Kit..!
But, for this time being Input is JSON file with all values..!
Member 11373970
28-Sep-16 2:27am
View
Need to add 3 more values for each parameter of a class in above mentioned format..!
Member 11373970
28-Sep-16 2:07am
View
Not code am looking for..!
It should be in JSON format like below.
var obj = {
"A": {
"a": { "Current": 30.0},
"b": { "Current": 60.0},
"c": { "Current": 60.0},
"d": { "Current": 60.0},
"e": { "Current": 60.0},
"f": false
},
"B": {
"g": { "Current": 30.0},
"h": { "Current": 60.0},
"i": { "Current": 60.0},
"j": { "Current": 60.0},
},
"C": {
"k": { "Current": 30.0},
"l": { "Current": 60.0},
"m": { "Current": 60.0},
"n": { "Current": 60.0},
}
}
Above one for 1 value...in the same way need 4 values for each parameter of a class in JSON format..!
Member 11373970
28-Sep-16 1:37am
View
Sure..!
Need .json file with all values, as mentioned earlier..!
Member 11373970
28-Sep-16 1:20am
View
Exactly Karthikk..!
Member 11373970
27-Sep-16 8:31am
View
It will be done like below..!
JObject o1 = JObject.Parse(File.ReadAllText(@"c:\videogames.json"));
// read JSON directly from a file
using (StreamReader file = File.OpenText(@"c:\videogames.json"))
using (JsonTextReader reader = new JsonTextReader(file))
{
JObject o2 = (JObject)JToken.ReadFrom(reader);
}
Accordingly,need .json file with all values, as mentioned earlier..!
Member 11373970
27-Sep-16 8:17am
View
Great Karthik..!
But, am expecting text file with the values in JSON structure/format..!
Member 11373970
27-Sep-16 7:16am
View
Yes Karthik..!
Member 11373970
27-Sep-16 6:48am
View
Yes..!
Member 11373970
27-Sep-16 6:26am
View
3 classes namely A, B and C.
Each class having different parameters, i.e, A-->a,b,c,d,e,f, B--> g,h,i,j and C--> k,l,m,n...!
Each parameter having 4 values.. i.e., a.value--> 10, 45, 85,1 and b.value --> 4,55,98,4.(In JSON format).
Hope you understand..!
Member 11373970
27-Sep-16 6:10am
View
Need four current values of each parameter and that should be in JSON format to display as four rows in grid.
The above one was with 1 current value..!
Member 11373970
27-Sep-16 5:57am
View
That's fine Karthik.
The above one was fine for 1st row.
How to add the values of 4 rows (in JSON text file) in best way..!
Member 11373970
27-Sep-16 5:48am
View
I will take care of the logic to read the data from JSON file and display the same in my grid.
But, my question is..the data should be in JSON structure..!
Member 11373970
27-Sep-16 5:33am
View
Thanks Karthik for your response..!
https://snag.gy/8MGxLn.jpg (For Screenshot)
Displays only current values of each parameter and it was not required to mention Min, Max and default vales.
Instead it should be only with current values like below.
var obj = {
"A": {
"a": { "Current": 30.0},
"b": { "Current": 60.0},
"c": { "Current": 60.0},
"d": { "Current": 60.0},
"e": { "Current": 60.0},
"f": false
},
"B": {
"g": { "Current": 30.0},
"h": { "Current": 60.0},
"i": { "Current": 60.0},
"j": { "Current": 60.0},
},
"C": {
"k": { "Current": 30.0},
"l": { "Current": 60.0},
"m": { "Current": 60.0},
"n": { "Current": 60.0},
}
}
Please suggest me the best way..!
Member 11373970
27-Sep-16 5:01am
View
It should be like this in grid format as 1st and 2nd row.(Unable to attach screenshot here)
5 2 4 200 50 10 1 600 5 51 50 1
8 4 2 620 10 55 2 150 8 16 25 0
Displays only current value of each parameter..!
Provided by you is for one row..!
Member 11373970
27-Sep-16 3:13am
View
Deleted
Thanks Karthik..!
I'm reading each parameter current value and displaying the same in grid as one row.
Could you please suggest me to display the 2nd row as follows..!
Show More