A JSON string property's value (simple, unescaped scalars). */
| 744 | |
| 745 | /* A JSON string property's value (simple, unescaped scalars). */ |
| 746 | static bool op_prop(const char *props, const char *key, char *out, size_t out_sz) { |
| 747 | char pat[CBM_SZ_64]; |
| 748 | snprintf(pat, sizeof(pat), "\"%s\":\"", key); |
| 749 | const char *p = props ? strstr(props, pat) : NULL; |
| 750 | if (!p) { |
| 751 | return false; |
| 752 | } |
| 753 | p += strlen(pat); |
| 754 | const char *e = strchr(p, '"'); |
| 755 | if (!e) { |
| 756 | return false; |
| 757 | } |
| 758 | snprintf(out, out_sz, "%.*s", (int)(e - p), p); |
| 759 | return true; |
| 760 | } |
| 761 | |
| 762 | /* CRD -> the Go type declared under its group, in every package marking it: |
| 763 | * an API group is one identity, and its CRDs and Go types routinely sit in |