question

SinghSg avatar image
0 Votes"
SinghSg asked SinghSg edited

Create Dynamic Enitty

Hi,
I'm using Jira API 3

I have defined my entity class as

for e.g.

internal Class JiraIssues
{
public string expand { get; set; }
public int startAt { get; set; }
public int maxResults { get; set; }
public string CustomField_123 { get; set; }
public string CustomField_1234 { get; set; }
}

In future more fields can be added so I cannot have a class that has a predefined properties, is there a way to define properties dynamically?
I.e. I get Json response from Jira API then I iterate through and create properties to accommodate new fields
for e.g. Public string CustomerField_12345{ get; set;}


Any pointers or any reference article on these lines will be very helpful.

Thanks
S

https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}' api-group-issues










dotnet-csharp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can we add properties dynamically in list?

In these examples they are talking about Expando do
how to do I define the properties at runtime...

In my case I'm going to get the property from Json Response
Ref


0 Votes 0 ·

0 Answers