Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4558576
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:40:07+00:00 2026-05-21T17:40:07+00:00

Is it possible to have some kind of type converter that allows Sync Framework

  • 0

Is it possible to have some kind of type converter that allows Sync Framework to treat string “0”/”1″ as boolean values for false/true. As per bool.parse documentation it is not supported by default so is there a way around it?

More details in case someone can suggest a different approach to this issue:
I have a custom Sync Framework client implementation for android and as it uses SQLite database there is no way for me to enforce some strict datatype on table field. I could come up with the convention to indicate boolean field with, say, “Is” prefix, but that would be nasty. Another thing is that booleans in SQLite are treated as numeric type thus inserting/updating boolean false/true to the SQLite database automatically converts them to 0/1 and I do not want to introduce some TRUE/FALSE = 1/0 conversion on android side.

Any thoughts are welcome.

[UPDATE] More details:
Server side consists of some services that are using Microsoft Sync Framework 4.0 CTP. There isn’t a lot to configure except creating scope and so on. Client side generates changeset and transmits it to the server using JSON format. The changeset comes from the SQLite database (and SQLite doesn’t have any native boolean representation except numeric 0/1), so when reading database there is no indication that coming data is of boolean type. Field value is serialized into JSON object as string with numeric value (“0” or “1”) and thus server side fails while trying to parse it to a bool.

Btw it is possible to work around it if doing one-way client-to-server synchronisation. I manually set server side entity field type to byte and Sync Framework nicely uses it as a “bit” database type. This workaround doesn’t work for server-to-client tho’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:40:08+00:00Added an answer on May 21, 2026 at 5:40 pm

    So it seams it is not possible to do what I ask in any easy way. At the end I opted in writing additional functionality to the android sync library to parse SQLite table definitions and use field descriptions to format outgoing synchronisation data.

    Thank you all for your effort.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible in Eclipse to have some kind of packages (sets of projects)
Possible Duplicate: Avoiding repeated constants in CSS We have some theme colors that are
Question So I've recently came up with some new possible projects that would have
I have some thread-related questions, assuming the following code. Please ignore the possible inefficiency
I'm not even sure if it's possible but say I have some XML: <source>
Is it possible to have something like a JTextArea which will color some keywords
Some SONY Cameras have a FireWire interface. Is it possible to control any camera
I have some code that consists of a lot (several hundreds of LOC) of
I have an optimization problem I want to solve. You have some kind of
I have some kind of impossible request :). I have a table where one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.