# Scylladb rust SerializeValue for CQL types and type values

**URL:** <https://forum.scylladb.com/t/scylladb-rust-serializevalue-for-cql-types-and-type-values/3048>\
**Category:** ScyllaDB\
**Tags:** data-model, rust-driver\
**Created:** [October 17, 2024, 11:36am UTC](https://forum.scylladb.com/t/scylladb-rust-serializevalue-for-cql-types-and-type-values/3048 "2024-10-17T11:36:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Indramal\_Wansekara](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/indramal_wansekara/32/353_2.png) [@Indramal\_Wansekara](https://forum.scylladb.com/u/Indramal_Wansekara)\
**Post date:** [October 17, 2024, 11:36am UTC](https://forum.scylladb.com/t/scylladb-rust-serializevalue-for-cql-types-and-type-values/3048/1 "2024-10-17T11:36:24Z")

</div>

This is struct use for insert and select data. But SerializeValue given me

> { user\_id: 45b5b8f7-4b5e-4df6-aedc-74327fba0ad5, first\_name: “Jane”, last\_name: “Smith”, email: “janesmith\_example.com”, phone: Some(“234-567-8901”), address: Some(“456 Oak St, Townsville”), shipping\_address: Some(“101 E-Commerce St, Townsville”), date\_of\_birth: Some(CqlDate(2147489452)), passwordv: “hashed\_password\_2”, salt: “random\_salt\_2”, role: Some(“seller”), is\_active: true, last\_login: CqlTimestamp(1729076400000), created\_at: CqlTimestamp(1727254800000), updated\_at: CqlTimestamp(1729078200000) }

How can i get values only?

> use scylla::{  
> frame::value::{CqlDate, CqlTimestamp},  
> FromRow, SerializeRow, SerializeValue,  
> };  
> use uuid::Uuid;
> 
> #[derive(Debug, SerializeRow, FromRow, SerializeValue)]  
> pub struct User {  
> pub user\_id: Uuid,  
> pub first\_name: String,  
> pub last\_name: String,  
> pub email: String,  
> pub phone: Option,  
> pub address: Option,  
> pub shipping\_address: Option,  
> pub date\_of\_birth: Option,  
> pub passwordv: String,  
> pub salt: String,  
> pub role: Option,  
> pub is\_active: bool,  
> pub last\_login: CqlTimestamp,  
> pub created\_at: CqlTimestamp,  
> pub updated\_at: CqlTimestamp,  
> }

---

<div class="post-metadata">

**Author:** ![Indramal\_Wansekara](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/indramal_wansekara/32/353_2.png) [@Indramal\_Wansekara](https://forum.scylladb.com/u/Indramal_Wansekara)\
**Post date:** [October 17, 2024, 11:41am UTC](https://forum.scylladb.com/t/scylladb-rust-serializevalue-for-cql-types-and-type-values/3048/2 "2024-10-17T11:41:03Z")

</div>

How can i get values only? Remove CqlTimestamp, Some and CqlDate in JSON.

---

<div class="post-metadata">

**Author:** ![Lorak](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/lorak/32/374_2.png) [@Lorak](https://forum.scylladb.com/u/Lorak)\
**Post date:** [November 4, 2024, 1:31pm UTC](https://forum.scylladb.com/t/scylladb-rust-serializevalue-for-cql-types-and-type-values/3048/3 "2024-11-04T13:31:48Z")

</div>

Sorry, I don’t really understand the question. Could you share how did you create this JSON?
