162
160
s_map_get (SMap * self, spointer key);
163
* This function removes an item from
168
166
s_map_remove (SMap * self, spointer key);
169
* Do a for each on each key/value pair.
171
* @note This function <em>must not</em> change the key. Changing of the
174
* The foreach should have the following signature:
177
my_foreach_func (SMap * map, SMapItem * item, spointer user_data);
179
* The <tt>user_data</tt> is passed to the function, and the <tt>item</tt>
180
* is what you operate on inside the function. <tt>map</tt> can be ignored.
183
s_map_foreach (SMap * self, ForEachFunc foreach_func, spointer user_data);
187
* @warning NOT IMPLIED
189
* Get the map as JSON.
190
* @param self The SMap to get the JSON from.
191
* @param to_json_key Functon to
193
* @return a null-terminated JSON string representing the matrix.
195
* The outputted JSON will have the format:
205
s_map_serialize_json (SMap * self,
206
FuncPointer to_json_key,
207
FuncPointer to_json_value);
211
* @warning NOT IMPLIED
213
* Deselialize JSON into an SMap.
215
* This will append the key/value pair to the map, with the caviat that
217
* @param self The SMap to write to.
218
* @param data the JSON data to be deselialised.
221
s_map_deserialize_json (SMap * self ,const char * data,
222
FuncPointer from_json_key,
223
FuncPointer from_json_value);