|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Implements small reusable yyjson wrappers with explicit ownership and type checks for Pharos native runtime callers. More...
#include "native_yyjson_helpers.h"#include "native_support.h"#include <limits.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| static char * | native_json_string_dup (yyjson_val *value) |
| Duplicates a JSON string value into owned storage. | |
| static int | native_json_long_from_value (yyjson_val *value, long *out) |
| Tests whether a numeric JSON value can be converted to long. | |
| static yyjson_val * | native_json_find_object_by_string_field (yyjson_val *array_value, const char *field_name, const char *expected_value) |
| Searches an object array for an element whose named field matches a string. | |
| yyjson_doc * | native_json_doc_load_file (const char *path) |
| Parses a JSON file into an owned yyjson document. | |
| yyjson_doc * | native_json_doc_load_text (const char *text) |
| Parses JSON text into an owned yyjson document. | |
| void | native_json_doc_free (yyjson_doc *doc) |
| Releases a document returned by the native yyjson helpers. | |
| yyjson_val * | native_json_obj_get (yyjson_val *obj, const char *key) |
| Looks up a key from a JSON object value. | |
| yyjson_val * | native_json_obj_get_array (yyjson_val *obj, const char *key) |
| Looks up an array-valued key from a JSON object value. | |
| char * | native_json_obj_get_string_dup (yyjson_val *obj, const char *key) |
| Duplicates a string-valued key from a JSON object. | |
| long | native_json_obj_get_long_default (yyjson_val *obj, const char *key, long default_value, int *found_out) |
| Reads a numeric object member or returns a fallback value. | |
| yyjson_val * | native_json_find_migration_by_id (yyjson_val *root, const char *migration_id) |
| Finds a migration record by migration_id under a fixture root. | |
| yyjson_val * | native_json_find_backend_by_name (yyjson_val *root, const char *backend_name) |
| Finds a backend record by backend name under a fixture root. | |
| char * | native_json_serialize_compact_dup (yyjson_val *value) |
| Serializes a JSON value to compact JSON text. | |
| char * | native_json_string_array_lines_dup (yyjson_val *array_value) |
| Converts a JSON string array into newline-delimited text. | |
Implements small reusable yyjson wrappers with explicit ownership and type checks for Pharos native runtime callers.
Definition in file native_yyjson_helpers.c.
| void native_json_doc_free | ( | yyjson_doc * | doc | ) |
Releases a document returned by the native yyjson helpers.
| doc | Document to free. NULL is allowed. |
Definition at line 140 of file native_yyjson_helpers.c.
References yyjson_doc_free().
Referenced by active_user_id_from_cookie_runtime(), append_audit_event_logic_local(), append_job_attempt_logic_local(), append_rate_limit_event_runtime_local(), append_validation_error_runtime(), append_workflow_and_effects_logic_local(), appointments_render_page_params_json_dup_runtime(), build_artifact_local_app_manifest_json(), business_availability_edit_page_params_json_dup_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), diagnostics_render_page_params_json_dup_runtime(), ensure_media_subtree(), explore_render_page_params_json_dup_runtime(), fixture_path_dup_logic_local(), generated_admin_manage_page_params_json_dup_runtime(), generated_surface_admin_create_load_runtime(), generated_surface_api_match_free_runtime(), generated_surface_api_match_runtime(), generated_surface_coerce_candidate_json_dup_runtime(), generated_surface_submitted_json_dup_runtime(), generated_surface_user_has_capability_runtime(), generated_surface_validation_report_add_field_error_dup_runtime(), generated_surface_validation_report_dup_runtime(), generated_surface_validation_report_has_errors_runtime(), handle_accept_invite_action_runtime(), handle_action_route(), handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_file_compact_object_command(), handle_file_field_number_command(), handle_file_field_string_command(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_backend_list_lines_command(), handle_file_migration_backend_record_json_command(), handle_file_migration_rows_lines_command(), handle_file_normalize_ucal_state_command(), handle_file_section_length_command(), handle_form_field_json_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_admin_create_request_runtime(), handle_generated_surface_api_request_runtime(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_display_value_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_filter_controls_html_command(), handle_generated_surface_form_fields_html_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_sort_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_issue_business_invite_action_runtime(), handle_manifest_app_root_command(), handle_manifest_fixture_path_raw_command(), handle_object_array_all_integers_command(), handle_object_array_item_json_lines_command(), handle_object_array_length_command(), handle_object_array_lines_command(), handle_object_build_command(), handle_object_field_number_command(), handle_object_field_string_command(), handle_object_field_text_command(), handle_object_merge_command(), handle_object_path_array_length_command(), handle_object_path_bool_command(), handle_object_path_json_command(), handle_object_path_number_command(), handle_object_path_string_command(), handle_object_relative_path_array_to_absolute_json_command(), handle_page_route(), handle_password_reset_complete_action_runtime(), handle_password_reset_request_action_runtime(), handle_request_compact_json_command(), handle_request_compact_object_command(), handle_request_compact_object_strict_command(), handle_request_field_command(), handle_state_named_command(), handle_template_declared_page_contract_command(), handle_template_layout_page_html_command(), handle_template_render_file_command(), handle_template_render_path_command(), handle_validation_error_envelope_command(), handle_validation_field_list_html_command(), handle_validation_has_errors_command(), handle_validation_summary_text_command(), issue_browser_session_runtime(), load_root_from_text_runtime(), native_build_sqlite_migrate_verify_failure_report_json(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_action_presentation_dup(), native_dynamic_dispatch_match(), native_dynamic_execute_declarative_action(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), native_dynamic_runtime_handle_request(), native_sqlite_migrate_verify_preflight_ok(), normalized_payload_object_mut_runtime(), profile_page_params_json_dup_runtime_local(), profile_render_page_params_json_dup_runtime(), proof_home_page_params_json_dup_runtime(), proof_state_root_load_runtime(), proof_ui_library_examples_html_dup_runtime(), render_business_fragment_from_doc_dup_runtime(), render_declared_page_response_with_headers_runtime(), render_page_html_dup_runtime(), resolve_declared_page_params_json_runtime(), resolve_invite_accept_page_params_json_runtime(), resolve_route_fixture_path(), revoke_session_by_cookie_runtime(), send_json_action_result_logic_local(), service_book_form_page_params_json_dup_runtime(), service_edit_page_params_json_dup_runtime(), write_business_availability_api_response(), write_business_services_api_response(), write_generated_surface_schema_response(), and write_proof_state_api_response().
| yyjson_doc * native_json_doc_load_file | ( | const char * | path | ) |
Parses a JSON file into an owned yyjson document.
| path | Path to the JSON file. |
Definition at line 113 of file native_yyjson_helpers.c.
References native_json_doc_load_text(), and read_file_text().
Referenced by active_user_id_from_cookie_runtime(), append_rate_limit_event_runtime_local(), appointments_render_page_params_json_dup_runtime(), business_availability_edit_page_params_json_dup_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), diagnostics_render_page_params_json_dup_runtime(), ensure_media_subtree(), explore_render_page_params_json_dup_runtime(), fixture_path_dup_logic_local(), generated_admin_manage_page_params_json_dup_runtime(), generated_surface_admin_create_load_runtime(), generated_surface_api_match_runtime(), generated_surface_user_has_capability_runtime(), handle_accept_invite_action_runtime(), handle_action_route(), handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_file_compact_object_command(), handle_file_field_number_command(), handle_file_field_string_command(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_backend_list_lines_command(), handle_file_migration_backend_record_json_command(), handle_file_migration_rows_lines_command(), handle_file_normalize_ucal_state_command(), handle_file_section_length_command(), handle_form_field_json_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_admin_create_request_runtime(), handle_generated_surface_api_request_runtime(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_form_fields_html_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_issue_business_invite_action_runtime(), handle_manifest_app_root_command(), handle_manifest_fixture_path_raw_command(), handle_password_reset_complete_action_runtime(), handle_password_reset_request_action_runtime(), handle_state_named_command(), handle_template_declared_page_contract_command(), issue_browser_session_runtime(), load_fixture_doc_logic_local(), native_build_sqlite_migrate_verify_failure_report_json(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_dispatch_match(), native_dynamic_execute_declarative_action(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), native_dynamic_runtime_handle_request(), native_sqlite_migrate_verify_preflight_ok(), profile_page_params_json_dup_runtime_local(), profile_render_page_params_json_dup_runtime(), proof_state_root_load_runtime(), proof_ui_library_examples_html_dup_runtime(), resolve_declared_page_params_json_runtime(), resolve_invite_accept_page_params_json_runtime(), revoke_session_by_cookie_runtime(), service_book_form_page_params_json_dup_runtime(), service_edit_page_params_json_dup_runtime(), write_business_availability_api_response(), write_business_services_api_response(), and write_generated_surface_schema_response().
| yyjson_doc * native_json_doc_load_text | ( | const char * | text | ) |
Parses JSON text into an owned yyjson document.
| text | NUL-terminated JSON text. |
Definition at line 128 of file native_yyjson_helpers.c.
References len, yyjson_read(), and YYJSON_READ_NOFLAG.
Referenced by append_audit_event_logic_local(), append_job_attempt_logic_local(), build_artifact_local_app_manifest_json(), load_root_from_text_runtime(), native_json_doc_load_file(), resolve_route_fixture_path(), and send_json_action_result_logic_local().
| yyjson_val * native_json_find_backend_by_name | ( | yyjson_val * | root, |
| const char * | backend_name ) |
Finds a backend record by backend name under a fixture root.
| root | Root object that may contain a backends array. |
| backend_name | Backend name to match. |
Definition at line 196 of file native_yyjson_helpers.c.
References native_json_find_object_by_string_field(), and native_json_obj_get_array().
Referenced by native_capture_migrate_verify_sqlite_report_json(), and native_sqlite_migrate_verify_preflight_ok().
| yyjson_val * native_json_find_migration_by_id | ( | yyjson_val * | root, |
| const char * | migration_id ) |
Finds a migration record by migration_id under a fixture root.
| root | Root object that may contain a migrations array. |
| migration_id | Migration identifier to match. |
Definition at line 186 of file native_yyjson_helpers.c.
References native_json_find_object_by_string_field(), and native_json_obj_get_array().
Referenced by native_capture_migrate_verify_sqlite_report_json(), and native_sqlite_migrate_verify_preflight_ok().
|
static |
Searches an object array for an element whose named field matches a string.
| array_value | Array to inspect. |
| field_name | Object field to compare. |
| expected_value | String value to match. |
Definition at line 87 of file native_yyjson_helpers.c.
References yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_equals_str(), yyjson_is_obj(), yyjson_is_str(), and yyjson_obj_get().
Referenced by native_json_find_backend_by_name(), and native_json_find_migration_by_id().
|
static |
Tests whether a numeric JSON value can be converted to long.
| value | Numeric JSON value. |
| out | Output location for the converted value. |
Definition at line 43 of file native_yyjson_helpers.c.
References yyjson_get_real(), yyjson_get_sint(), yyjson_get_uint(), yyjson_is_num(), yyjson_is_real(), yyjson_is_sint(), and yyjson_is_uint().
Referenced by native_json_obj_get_long_default().
| yyjson_val * native_json_obj_get | ( | yyjson_val * | obj, |
| const char * | key ) |
Looks up a key from a JSON object value.
| obj | Object value to inspect. |
| key | Key name to resolve. |
Definition at line 147 of file native_yyjson_helpers.c.
References yyjson_is_obj(), and yyjson_obj_get().
Referenced by action_presentation_string_dup_logic_local(), active_user_id_from_cookie_runtime(), append_generated_admin_surface_rows_runtime(), append_generated_surface_relation_checkboxes_html_runtime(), append_generated_surface_select_options_html_runtime(), append_record_primitive_logic_local(), append_records_from_input_list_primitive_logic_local(), append_records_from_related_collection_primitive_logic_local(), append_workflow_and_effects_logic_local(), assign_technician_for_slot_runtime(), assign_technician_for_slot_runtime_local(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), bulk_update_primitive_logic_local(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), business_open_for_slot_runtime(), business_open_for_slot_runtime_local(), collect_business_service_list_runtime(), default_signed_in_path_runtime(), emit_active_tenant_ids_lines_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_availability_lines_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_business_technician_ids_lines_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_availability_lines_runtime(), emit_technician_edit_page_json_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), ensure_media_subtree(), event_stream_allowed_by_scope_runtime(), event_stream_resource_id_dup_runtime(), explore_render_page_params_json_dup_runtime(), field_value_from_contract_logic_local(), find_action_contract_logic_local(), find_active_token_record_runtime(), find_array_item_by_long_field_runtime(), find_array_item_by_string_field_runtime(), find_business_by_slug_runtime_local(), find_integration_adapter_logic_local(), find_user_by_username_runtime_local(), find_workflow_transition_logic_local(), fixture_path_dup_logic_local(), generated_admin_manage_page_params_json_dup_runtime(), generated_surface_admin_create_load_runtime(), generated_surface_api_match_runtime(), generated_surface_append_audit_event_mut_runtime(), generated_surface_coerce_candidate_json_dup_runtime(), generated_surface_compare_items_runtime(), generated_surface_delete_button_label_dup_runtime(), generated_surface_display_value_dup_runtime(), generated_surface_field_label_dup_runtime(), generated_surface_filter_item_matches_runtime(), generated_surface_normalize_order_mut_runtime(), generated_surface_operation_matches_runtime(), generated_surface_operation_path_dup_runtime(), generated_surface_submitted_json_dup_runtime(), generated_surface_user_has_capability_runtime(), generated_surface_validation_report_dup_runtime(), handle_accept_invite_action_runtime(), handle_action_route(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_rows_lines_command(), handle_generated_surface_admin_create_request_runtime(), handle_generated_surface_api_request_runtime(), handle_generated_surface_coerce_candidate_command(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_manifest_fixture_path_raw_command(), handle_object_field_text_command(), handle_password_reset_complete_action_runtime(), handle_password_reset_request_action_runtime(), handle_request_field_command(), handle_state_event_stream_row_json_lines_command(), handle_state_named_command(), load_action_inputs_logic_local(), max_id_in_state_section_runtime(), migration_backend_record_runtime(), migration_backend_record_runtime_local(), migration_expected_checksum_dup_runtime(), migration_expected_checksum_dup_runtime_local(), migration_record_by_id_runtime(), native_append_forward_sql_bundle(), native_build_sqlite_migrate_verify_failure_report_json(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_action_presentation_dup(), native_dynamic_dispatch_match(), native_dynamic_execute_declarative_action(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), native_json_obj_get_array(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), native_sqlite_migrate_verify_preflight_ok(), object_value_at_path_runtime(), payload_first_long_runtime(), profile_render_page_params_json_dup_runtime(), proof_home_page_params_json_dup_runtime(), proof_state_root_load_runtime(), proof_task_items_html_dup_runtime(), proof_ui_library_examples_html_dup_runtime(), record_field_matches_text_value_logic_local(), render_service_sort_order_options_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), render_template_text_with_default_kind_dup_runtime(), resolve_invite_accept_page_params_json_runtime(), resolve_route_fixture_path(), runtime_generated_admin_surface_find(), runtime_generated_surface_admin_composition_path_dup(), runtime_generated_surface_append_relation_checkboxes_html(), runtime_generated_surface_append_select_options_html(), runtime_generated_surface_build_filter_controls_html(), runtime_generated_surface_build_form_fields_html(), runtime_generated_surface_build_manage_sections_html(), runtime_generated_surface_build_record_cards_html(), runtime_generated_surface_build_sort_options_html(), runtime_generated_surface_composition_find_section(), runtime_generated_surface_composition_section_enabled(), runtime_generated_surface_delete_button_label_dup(), runtime_generated_surface_display_value_dup(), runtime_generated_surface_operation_path_dup(), runtime_surface_find_by_id(), runtime_surface_find_form(), runtime_ui_example_body_html_dup(), scope_match_expected_text_dup_logic_local(), scoped_reassignment_primitive_logic_local(), send_json_action_result_logic_local(), service_book_form_page_params_json_dup_runtime(), service_edit_page_params_json_dup_runtime(), set_root_fields_primitive_logic_local(), state_array_runtime_local(), state_find_booking_for_user_runtime(), state_find_business_availability_for_business_runtime(), state_find_first_service_for_business_runtime(), state_find_google_calendar_connection_for_business_runtime(), state_find_service_for_business_runtime(), state_find_technician_for_business_runtime(), state_find_user_by_email_runtime(), state_tenant_id_for_business_id_runtime(), state_tenant_id_for_business_slug_runtime(), string_value_from_contract_logic_local(), surface_build_active_filters_runtime(), surface_build_sort_config_runtime(), surface_compare_sort_values_runtime(), surface_context_match_runtime(), surface_filter_item_runtime(), surface_find_by_id_runtime(), surface_find_form_runtime(), surface_find_record_by_string_field_runtime(), technician_booked_for_slot_runtime(), technician_booked_for_slot_runtime_local(), update_record_primitive_logic_local(), user_has_active_tenant_membership_runtime_local(), user_manages_business_runtime(), workflow_presentation_string_dup_logic_local(), write_generated_surface_api_item_response_runtime(), write_generated_surface_api_list_response_runtime(), and write_generated_surface_schema_response().
| yyjson_val * native_json_obj_get_array | ( | yyjson_val * | obj, |
| const char * | key ) |
Looks up an array-valued key from a JSON object value.
| obj | Object value to inspect. |
| key | Key name to resolve. |
Definition at line 154 of file native_yyjson_helpers.c.
References native_json_obj_get(), and yyjson_is_arr().
Referenced by append_generated_surface_select_options_html_runtime(), assign_technician_for_slot_runtime(), assign_technician_for_slot_runtime_local(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_service_book_form_page_json_runtime(), ensure_media_subtree(), find_form_field_value_runtime(), generated_surface_api_match_runtime(), generated_surface_field_label_dup_runtime(), generated_surface_filter_item_matches_runtime(), generated_surface_submitted_json_dup_runtime(), generated_surface_user_has_capability_runtime(), generated_surface_validation_report_dup_runtime(), generated_surface_validation_report_has_errors_runtime(), handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_file_generated_surface_match_command(), handle_file_migration_backend_files_json_command(), handle_file_migration_backend_list_lines_command(), handle_file_migration_rows_lines_command(), handle_file_section_length_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_list_columns_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_state_named_command(), handle_validation_field_list_html_command(), handle_validation_has_errors_command(), handle_validation_summary_text_command(), max_id_in_state_section_runtime(), migration_backend_record_runtime(), migration_backend_record_runtime_local(), migration_expected_checksum_dup_runtime(), migration_expected_checksum_dup_runtime_local(), migration_record_by_id_runtime(), native_append_forward_sql_bundle(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_dispatch_match(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), native_json_find_backend_by_name(), native_json_find_migration_by_id(), native_legacy_expected_migration_checksum(), native_sqlite_migrate_verify_preflight_ok(), render_service_booking_options_editor_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), service_book_form_page_params_json_dup_runtime(), state_array_runtime(), surface_build_active_filters_runtime(), surface_build_sort_config_runtime(), surface_find_by_id_runtime(), surface_find_form_runtime(), write_generated_surface_api_item_response_runtime(), and write_generated_surface_api_list_response_runtime().
| long native_json_obj_get_long_default | ( | yyjson_val * | obj, |
| const char * | key, | ||
| long | default_value, | ||
| int * | found_out ) |
Reads a numeric object member or returns a fallback value.
| obj | Object value to inspect. |
| key | Key name to resolve. |
| default_value | Value returned when the key is absent or not numeric. |
| found_out | Optional output flag set to non-zero when a numeric value was found and consumed, otherwise 0. |
Definition at line 166 of file native_yyjson_helpers.c.
References native_json_long_from_value(), and native_json_obj_get().
Referenced by active_user_id_from_cookie_runtime(), append_generated_admin_surface_rows_runtime(), append_profile_subscription_rows_runtime(), append_records_from_related_collection_primitive_logic_local(), append_workflow_and_effects_logic_local(), appointments_render_page_params_json_dup_runtime(), assign_technician_for_slot_runtime(), assign_technician_for_slot_runtime_local(), bulk_update_primitive_logic_local(), business_availability_edit_page_params_json_dup_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), collect_business_service_list_runtime(), compare_item_id_runtime(), diagnostics_render_page_params_json_dup_runtime(), emit_active_tenant_ids_lines_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_business_technician_ids_lines_runtime(), emit_calendar_page_json_runtime(), emit_manageable_business_cards_json_runtime(), emit_managed_appointments_json_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_assigned_technician_ids_lines_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_edit_page_json_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), event_stream_allowed_by_scope_runtime(), find_appointment_by_id_runtime_local(), find_business_by_id_runtime_local(), find_service_for_business_runtime_local(), find_user_by_id_runtime_local(), generated_admin_manage_page_params_json_dup_runtime(), generated_surface_admin_create_load_runtime(), generated_surface_api_match_runtime(), generated_surface_normalize_order_mut_runtime(), generated_surface_user_has_capability_runtime(), generated_surface_validation_report_dup_runtime(), handle_accept_invite_action_runtime(), handle_action_route(), handle_file_field_number_command(), handle_file_migration_rows_lines_command(), handle_generated_surface_admin_create_request_runtime(), handle_generated_surface_api_request_runtime(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_mutate_command(), handle_issue_business_invite_action_runtime(), handle_object_field_number_command(), handle_password_reset_complete_action_runtime(), handle_password_reset_request_action_runtime(), handle_state_event_stream_row_json_lines_command(), handle_state_named_command(), handle_state_ucal_import_row_json_lines_command(), issue_browser_session_runtime(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_execute_declarative_action(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), next_array_id_runtime_local(), process_webhook_delivery_logic_local(), profile_render_page_params_json_dup_runtime(), proof_approval_requests_html_dup_runtime(), proof_task_items_html_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), resolve_invite_accept_page_params_json_runtime(), resource_link_display_load_runtime(), runtime_generated_surface_append_relation_checkboxes_html(), runtime_generated_surface_build_record_cards_html(), scoped_reassignment_primitive_logic_local(), send_json_action_result_logic_local(), service_book_form_page_params_json_dup_runtime(), service_edit_page_params_json_dup_runtime(), state_tenant_id_for_business_id_runtime(), state_tenant_id_for_business_runtime_local(), state_tenant_id_for_business_slug_runtime(), state_tenant_id_for_service_id_runtime(), state_tenant_id_for_technician_id_runtime(), surface_sort_items_runtime(), technician_booked_for_slot_runtime(), technician_booked_for_slot_runtime_local(), user_has_active_tenant_membership_runtime_local(), user_manages_business_runtime(), write_business_availability_api_response(), write_business_services_api_response(), and write_generated_surface_api_list_response_runtime().
| char * native_json_obj_get_string_dup | ( | yyjson_val * | obj, |
| const char * | key ) |
Duplicates a string-valued key from a JSON object.
| obj | Object value to inspect. |
| key | Key name to resolve. |
Definition at line 162 of file native_yyjson_helpers.c.
References native_json_obj_get(), and native_json_string_dup().
Referenced by action_presentation_string_dup_logic_local(), active_user_id_from_cookie_runtime(), append_action_report_logic_local(), append_audit_event_logic_local(), append_generated_admin_surface_rows_runtime(), append_generated_surface_relation_checkboxes_html_runtime(), append_generated_surface_select_options_html_runtime(), append_record_primitive_logic_local(), append_records_from_input_list_primitive_logic_local(), append_records_from_related_collection_primitive_logic_local(), append_workflow_and_effects_logic_local(), appointments_render_page_params_json_dup_runtime(), assign_technician_for_slot_runtime(), assign_technician_for_slot_runtime_local(), build_generated_surface_filter_controls_html_runtime(), build_generated_surface_form_fields_html_runtime(), build_generated_surface_sort_options_html_runtime(), bulk_update_primitive_logic_local(), business_availability_edit_page_params_json_dup_runtime(), business_calendar_render_page_params_json_dup_runtime(), business_dashboard_render_page_params_json_dup_runtime(), business_detail_admin_render_page_params_json_dup_runtime(), business_edit_page_params_json_dup_runtime(), business_landing_render_page_params_json_dup_runtime(), business_open_for_slot_runtime(), business_open_for_slot_runtime_local(), collect_event_stream_row_runtime(), diagnostics_render_page_params_json_dup_runtime(), emit_appointments_page_json_runtime(), emit_business_admin_page_json_runtime(), emit_business_admin_service_rows_json_runtime(), emit_business_admin_technician_rows_json_runtime(), emit_business_availability_lines_runtime(), emit_business_calendar_page_json_runtime(), emit_business_calendar_render_page_json_runtime(), emit_business_edit_page_json_runtime(), emit_business_public_page_json_runtime(), emit_business_public_render_page_json_runtime(), emit_calendar_page_json_runtime(), emit_explore_page_json_runtime(), emit_manageable_business_cards_json_runtime(), emit_managed_appointments_json_runtime(), emit_object_string_field_runtime(), emit_profile_page_json_runtime(), emit_profile_render_page_json_runtime(), emit_public_business_cards_json_runtime(), emit_service_book_form_page_json_runtime(), emit_service_edit_page_json_runtime(), emit_technician_appointments_lines_runtime(), emit_technician_availability_lines_runtime(), emit_technician_edit_page_json_runtime(), emit_user_appointments_json_runtime(), emit_user_membership_tenant_ids_json_runtime(), ensure_media_subtree(), event_stream_allowed_by_scope_runtime(), event_stream_matches_filters_runtime(), event_stream_resource_id_dup_runtime(), explore_render_page_params_json_dup_runtime(), field_value_from_contract_logic_local(), find_active_token_record_runtime(), find_form_field_value_runtime(), fixture_path_dup_logic_local(), generated_admin_manage_page_params_json_dup_runtime(), generated_surface_admin_create_load_runtime(), generated_surface_api_match_runtime(), generated_surface_append_audit_event_mut_runtime(), generated_surface_compare_items_runtime(), generated_surface_delete_button_label_dup_runtime(), generated_surface_delete_strategy_runtime(), generated_surface_field_label_dup_runtime(), generated_surface_filter_item_matches_runtime(), generated_surface_normalize_order_mut_runtime(), generated_surface_operation_path_dup_runtime(), generated_surface_submitted_json_dup_runtime(), generated_surface_user_has_capability_runtime(), generated_surface_validation_report_dup_runtime(), handle_accept_invite_action_runtime(), handle_action_route(), handle_bundle_manifest_layer_for_slice_command(), handle_bundle_manifest_slice_order_command(), handle_file_field_string_command(), handle_file_generated_surface_match_command(), handle_file_migration_rows_lines_command(), handle_form_field_json_lines_command(), handle_form_options_csv_command(), handle_form_options_html_command(), handle_generated_surface_admin_create_request_runtime(), handle_generated_surface_api_request_runtime(), handle_generated_surface_context_command(), handle_generated_surface_default_candidate_command(), handle_generated_surface_edit_page_json_command(), handle_generated_surface_list_result_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_generated_surface_mutate_command(), handle_generated_surface_params_json_command(), handle_generated_surface_relation_checkboxes_html_command(), handle_generated_surface_select_options_html_command(), handle_generated_surface_submitted_command(), handle_generated_surface_validation_report_command(), handle_manifest_app_root_command(), handle_object_field_string_command(), handle_page_route(), handle_password_reset_complete_action_runtime(), handle_password_reset_request_action_runtime(), handle_request_field_command(), handle_state_event_stream_row_json_lines_command(), handle_state_named_command(), handle_state_ucal_import_row_json_lines_command(), handle_template_declared_page_contract_command(), handle_validation_error_envelope_command(), handle_validation_field_list_html_command(), handle_validation_summary_text_command(), integration_adapter_target_url_dup_logic_local(), load_action_inputs_logic_local(), migration_expected_checksum_dup_runtime(), migration_expected_checksum_dup_runtime_local(), native_build_sqlite_migrate_verify_failure_report_json(), native_capture_migrate_verify_sqlite_report_json(), native_dynamic_action_presentation_dup(), native_dynamic_dispatch_match(), native_dynamic_execute_declarative_action(), native_dynamic_relational_postgresql_runtime_prepare(), native_dynamic_relational_sqlite_runtime_prepare(), native_json_object_string_json_dup(), native_legacy_expected_migration_checksum(), native_sqlite_migrate_verify_preflight_ok(), page_title_dup_runtime(), payload_first_string_dup_runtime(), process_due_integration_deliveries_logic_local(), process_webhook_delivery_logic_local(), profile_page_params_json_dup_runtime_local(), profile_render_page_params_json_dup_runtime(), proof_approval_requests_html_dup_runtime(), proof_home_page_params_json_dup_runtime(), proof_task_items_html_dup_runtime(), render_business_dashboard_cards_html_dup_runtime(), render_declared_page_response_with_headers_runtime(), render_service_booking_options_editor_html_dup_runtime(), render_technician_checkboxes_html_dup_runtime(), resolve_declared_page_params_json_runtime(), resolve_invite_accept_page_params_json_runtime(), resolve_route_fixture_path(), resource_link_display_load_runtime(), runtime_generated_surface_admin_composition_path_dup(), runtime_generated_surface_append_relation_checkboxes_html(), runtime_generated_surface_append_select_options_html(), runtime_generated_surface_build_filter_controls_html(), runtime_generated_surface_build_form_fields_html(), runtime_generated_surface_build_record_cards_html(), runtime_generated_surface_build_sort_options_html(), runtime_generated_surface_composition_string_dup(), runtime_generated_surface_delete_button_label_dup(), runtime_generated_surface_operation_path_dup(), runtime_ui_library_examples_append(), scope_match_expected_text_dup_logic_local(), scoped_reassignment_primitive_logic_local(), send_action_response_logic_local(), send_redirect_logic_local(), service_book_form_page_params_json_dup_runtime(), service_edit_page_params_json_dup_runtime(), state_find_user_by_email_runtime(), string_value_from_contract_logic_local(), surface_build_active_filters_runtime(), surface_build_sort_config_runtime(), surface_filter_item_runtime(), surface_sort_items_runtime(), technician_booked_for_slot_runtime(), technician_booked_for_slot_runtime_local(), update_record_primitive_logic_local(), workflow_presentation_string_dup_logic_local(), and write_generated_surface_api_list_response_runtime().
| char * native_json_serialize_compact_dup | ( | yyjson_val * | value | ) |
Serializes a JSON value to compact JSON text.
| value | Value to serialize. |
Definition at line 206 of file native_yyjson_helpers.c.
References yyjson_val_write(), and YYJSON_WRITE_NOFLAG.
Referenced by emit_compact_json_value_runtime(), emit_json_line_runtime(), event_stream_resource_id_dup_runtime(), generated_surface_coerce_candidate_json_dup_runtime(), handle_bundle_manifest_slice_order_command(), handle_form_field_json_lines_command(), handle_generated_surface_manage_page_json_command(), handle_generated_surface_manage_table_json_command(), handle_object_array_item_json_lines_command(), handle_object_array_lines_command(), handle_state_named_command(), json_value_tostring_dup_runtime(), json_value_tostring_dup_runtime_local(), native_json_value_or_literal_dup(), proof_home_page_params_json_dup_runtime(), and template_value_text_dup_runtime().
| char * native_json_string_array_lines_dup | ( | yyjson_val * | array_value | ) |
Converts a JSON string array into newline-delimited text.
| array_value | Array whose elements must all be JSON strings. |
Definition at line 213 of file native_yyjson_helpers.c.
References buffer_append(), buffer_free(), buffer_init(), Buffer::data, dup_range(), Buffer::len, len, yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_get_len(), yyjson_get_str(), yyjson_is_arr(), and yyjson_is_str().
|
static |
Duplicates a JSON string value into owned storage.
| value | JSON string value to duplicate. |
Definition at line 19 of file native_yyjson_helpers.c.
References len, yyjson_get_len(), yyjson_get_str(), and yyjson_is_str().
Referenced by native_json_obj_get_string_dup().