jfrog-client-go icon indicating copy to clipboard operation
jfrog-client-go copied to clipboard

Can you enable instances to be filled with json?

Open Pymann opened this issue 3 years ago • 2 comments

I think the subject is enough explanation.

Do you really want every user to call hundreads of Set Function? If it could be a oneliner: json.Unmarshal(bytes, &instance_of_config_or_whatever)

Pymann avatar May 05 '21 20:05 Pymann

Hi @Pymann, There's a chance I didn't fully get what you're suggesting, so please correct me if I'm wrong, but doesn't the code supports this already? Can't you already unmarshall instead of using the set functions? What's missing?

eyalbe4 avatar May 05 '21 21:05 eyalbe4

Only exportable struct-fields can be un/marshaled, because other ones are private. You know meaning of lower/upper-case of capital letter of struct-field-name?

Pymann avatar May 06 '21 20:05 Pymann