Re: [PATCH 2/2] kernel-shark-qt: Add Json I/O for filter configurations.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On  8.08.2018 15:32, Steven Rostedt wrote:
On Wed, 8 Aug 2018 14:48:10 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

Hi Steven,

On  8.08.2018 04:21, Steven Rostedt wrote:
/**
+ * @brief Create an empty Json document and set its type description.
+ *
+ * @param type: String describing the type of the document,
+ *		e.g. "kshark.record.config" or "kshark.filter.config".
+ *
+ * @returns json_object instance. Use json_object_put() to free the object.
I wonder if we should add handlers like:

	kshark_config_free(struct json_object *jobj);

and call that instead? Perhaps even create our own object that may
contain extra state that the json object does not, and return that?


What do we gain by doing it this way?


    CONTROL!!!!! :-) :-)


But seriously, if we had our own abstraction for the json objects, we
could carry extra data along with it if need be. In fact, we could
abstract out completely that we use json. We could just add our own
wrappers, and if some day in the future, something else comes along
that's better than json, we could switch to that.


OK will try to implement a wrapper and abstract out the use json.

Thanks!
Yordan


I'm not strongly committed to doing this abstraction, but I want us to
think about it before we commit to anything. Like I said, forward
compatibility is the difficult part. I don't know exactly how this is
all going to end up being used, but I like to keep my options open.

-- Steve




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux