Examples in c# of getting data from kobotoolbox using the API

The c# code above works and gives me a json string representing an object hierarchy 3 levels deep.

Due to the naming convention used by kobotoolbox, a lot of the property names have embedded slashes in them like the example below.
"fishing_vessel_group/search_value":"m", "soak_time_group/soaktime_tracking_group/gps":"LAM"

I need to remove the embedded slashes from the property names before feeding the json string into a parser that creates the objects that represent one or more submissions.

I would like to ask if anyone already has a solution to this problem. I prefer a regex solution where it finds strings containing slashes that are enclosed in quotes. What I propose is to replace the slash with a safe character like 2 successive underscores so that the property name becomes legal in c#.

Thanks again.

1 Like