Skip to content

Non-string variables returned as "strings" #273

Closed
@pb66

Description

We recently added "fetch" to the feed api so that multiple feed values could be returned in 1 request, A url like "http://localhost/emoncms/feed/fetch.json?ids=1,2,3,4,5,6" returns the current values for feeds 1 thru 6. But each value is in double quotes which isn't necessary and just adds to the size of the data and creates extra complexity to parse. eg

["23974","23974","473","8","5","950"] = 37bytes

would be better as

[23974,23974,473,8,5,950] = 25bytes

In this example a massive 50% increase in data size due to the quotation marks
2bytes per value wastage when strings of string values sent.

12bytes may not be alot but on a 5sec interval that's over 200KB per day (6MBpcm) and could easily mount up with more values.

I'm not very good with php and am not sure where the values become strings, where and how could these variable be cast or just not passed as strings?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions