Hi I was wondering if something like this was possible or not, I'm sure my title question wasn't clear.
Say I have a function that returns a JSON representation of an object. Note: This is more pseudocode than anything don't correct me on the function.
public static json function(object){
}
Is it possible to define an object like this (I'm working with c#)
var exampleObject = { Name: "x" , PhoneNum: "123456789" }
I was hoping there would be a way to create a object with object attributes just like that on the fly without having to make a class like:
class exampleObject{
string name;
string phoneNum;
}
Does something like this exist? Thanks.