<p>A method for producing a polymer comprising reacting a fluoride and a monomer having a boronic acid moiety, or a salt thereof, in acidic aqueous solution and/or in an aliphatic alcohol. Polymerization occurs with the addition of an oxidizing agent. The method may further comprise the step of purification of the polymer by centrifugation with 0.5 M HCl and/or dispersion of the polymer in a solvent. The polymer has a morphology tunable by changing the solvent.</p>