I\'m trying to understand/compare ways to handle memory allocation for holding JSON string to pass from C to JS in a browser extension using the native-messaging API. There